I'm setting up a sharer on my site pages, and i've found different links for using the sharer :
share.php
sharer.php
sharer/sharer.php
Which one is the right one to use ?
In the Facebook doc it says the second one, but only with the third was i able to share to a fan page (no linked profile).
Is there a difference between sharing on a profile or on a page ?
Thanks.
There is not much difference among them, it is just their looks and size that is changed using the property type.
I would strongly recommend against:
"The Share button has been deprecated in favor of the Like button, and will no longer be supported.
Please use the Like button whenever possible to drive maximum traffic to your apps."
So, instead of waking up with an nonfunctional share button, you'd be better off with a like button, or implementing a share button from scratch using the JS SDK.
Also, I can tell you for a fact that most of the people would share on their own wall rather than on a page.
The correct one to use is sharer/sharer.php
<a href="https://www.facebook.com/sharer/sharer.php?u=example.org" target="_blank">
Share on Facebook
</a>
https://developers.facebook.com/docs/reference/plugins/share-links/
Related
I am building a brand new website in Sitecore and I am looking for advice on the following scenario:
My site has 2 version of its homepage. Both are quite different. The layout is the same, but most of the components and sublayouts on it will change depending on whether the user is logged in or not.
Does anybody has a suggestion of a good practice, or way to do that in Sitecore? My basic requirements are, have a single URL for both (the website root, it is a homepage) and do not harm the content author experience.
My thought so far was:
Use of personalization to control the components to be displayed (Concerns: performance and the content author experience he woudnt have to change component by component to see both versions)
Use of two item in the tree and intercept a pipeline to resolve the right item at the right time (Concerns: the content author would have two home items to maintain *not actually a big problem)
Does anybody has any other approach or considerations on those I listed?
Thanks
An alternative solution would be to make use of devices, and use a pipeline to switch devices if the user is logged in.
Set up your Device in Sitecore to use the default layout as a fallback so it does not affect other pages in your site (and they continue to work as expected). You are then able to set different sublayouts and components for that Item (directly or in Standard Values for the template) for each device. You can make use the VaryByDevice caching option to make better use of the Cache.
Your content editors can also switch between the devices easily in the Page Editor from the ribbon. Any further customization you need in other areas of the site, such has switching out a single component, can be run using a Personlization Rule taking advantage of "where the current device compares to value".
It does sound like you have the need for personalization based on authenticated status, so I would recommend staying with the built-in personalization interface to avoid confusion. Authors will have been trained during Sitecore training on how to use personalization, and introducing an alternative method for accomplishing the same thing could lead to a less-than-optimal experience for the author.
To address your concern of the author needing to view components by toggling each one, I would recommend installing the Experience Explorer module. You can create presets that meet your rules on your presentation and then the author can preview the site for different 'experiences'.
If you have a single URL for the home page, it is more straight-forward to go with a single item, so I would definitely advise against having two home page items that are being resolved by the same URL.
You mentioned a concern for performance, so I would recommend you making sure that you enable your sublayout caching settings. In your case, varying by Data may be the way to go, given you would personalize with two sets of datasources.
In the past I have used the following crude technique:
Make two components, one for "logged in" and the other for anonymous.
Each rendering has just one line, a single placeholder, either:
<sc:placeholder key="logged-in" runat="server" />
or
<sc:placeholder key="anonymous" runat="server" />
For "logged in" I make a personalisation rule which hides the component if anonymous, and for the anonymous component I make a personalisation rule which hides the component if the user is logged in.
I then nest all the components under the correct placeholder key.
https://developers.facebook.com/docs/sharing/reference/share-dialog VS https://developers.facebook.com/docs/plugins/share-button
In experimenting with both the FB.ui share dialog and using the fb:share-button / class="fb-share-button" I've noticed that using the FB.ui method does not offer sharing options (Share on your timeline, friends' timeline, etc) in the dialog and the og:description is not displayed on the FB post (yet it is in the post preview) and markup formatting for the display is different. It's obvious that both methods are using two different services:
FB.ui: .../v2.0/dialog/share... and Share Button: .../sharer/sharer.php?...
One would think that by leveraging the JavaScript SDK a developer would have more options to customize the sharing experience, but in my experience thus far, that doesn't seem to be case.
Yes, I've run my links through the linter, my open graph tags are set properly and I've added the "scrape=true" to my query string.
At the very least, I'd hope that the og:description would get displayed on a FB post by leveraging the SDK and that the formatting would be the same. Any validation of this behavior and workarounds?
Same problem here; plus the share count on the url is not updated if shared with the share dialog; it is if it's done using the share button.
pretty weird, a bug maybe?
Is there anyway to detect if the tab app is being loading in the new timeline or not? I got clients asking to upgrade my layout but not all of them have upgraded so it makes it hard to do that. If I had a way to detect this it would be perfect.
I managed to do that by looking for an album called "Cover Photos" on the album list of that page. Here's a sample:
http://graph.facebook.com/-page_id-/albums?fields=name
You don't need a token unless the page isn't published yet.
The problem with this approach is that some pages still don't have cover picture yet, but it's the minority.
is there a specific link that I can use for "Liking" something? I'm looking to make a rating system that when someones votes something as 5 stars, it automatically "Likes" the image or whatever. I know there is www.facebook.com/plugins/like.php?, but when I use that in my JavaScript, it automatically forwards them to a page with a like button only on it...
FYI, I'm not hiding the like button, it will be known by users...
I also tried .trigger('click'); but that doesn't work with the like button!
Thanks in advance!
You have stumbled across some road-blocks that Facebook implemented to prevent abuse of their like button. You will have to play by their rules to play in their sandbox they built. So use the social plugin: http://developers.facebook.com/docs/reference/plugins/like/
It's awful that this thing is called "Like"-Box and there is no way to like, comment or share on an actual wallpost shown in the activity feed!
Is there a way to customize the Like-Box core so that these three little items are shown?
Would be great!
The only customization options are those found on the documentation page. You could build your own though using the Facebook graph API to pull a pages feed down and add like and share buttons.