So basically, because I am on mobile, I can't use the www.facebook.com/sharer.php. I have to use Open Graph meta tags on my page and share that page using the m.facebook.com/sharer.php. The issue I am currently having is that it's impossible to specify the caption of the share through open graph meta tags. It keeps using the domain of the URL. With the web sharer you can specify the caption and it will place it under the title.
Does anyone know how I can specify the caption of a share in Open graph using meta tags? There doesn't seem to be a meta tag that equates to the caption query string parameter of the web sharer.
The sharer.php endpoints have been officially deprecated for a while now. You should not be developing new code that relies on these as they could stop working at any time.
You should use the feed dialog instead. It gives you the ability to set a custom caption.
Related
I need to make a customized share button, where I can programmatically modify all the components of the share, such as the title, description, and sharing image.
I have tried just the og meta tags, but they haven't made a difference. I tried adding data-image etc. tags to the HTML link element, and that didn't fix it either. I also tried using the JS SDK, where I create a postToFeed() function with the data.
Am I doing something wrong? Are these outdated methods? Is this not the expected use case for the SDK share functions?
You need to refresh the Open Graph data for an URL in the debugger: https://developers.facebook.com/tools/debug/
That tool is very important to test your OG tags too, of course.
You can also use the feed dialog and specify your own data: https://developers.facebook.com/docs/sharing/reference/feed-dialog/
Although, i would recommend using OG tags with the share dialog.
I want to make a custom Facebook share button on a website. I use this link:
http://www.facebook.com/sharer.php?s=100&p[title]=title&p[url]=http://myurl.com&p[summary]=summary&p[images][0]=myimage
I have set the og Meta-Tags for sharing the main-site. But the Problem is that if I use the share Link above Facebook shows images/title/summary/etc from the Meta-Tags and not from the Link Parameters.
How can I force Facebook to use the data from the Parameters without changing/removing the Meta-Tags
The sharer will no longer accept custom parameters and facebook will pull the information that is being displayed in the preview the same way that it would appear on facebook as a post, from the url OG meta tags.
Source: https://developers.facebook.com/x/bugs/357750474364812/
You can use the feed dialog instead, but you would need to create an App for that: https://developers.facebook.com/docs/sharing/reference/feed-dialog
Some Background Info
As of Mar/Feb 2014, the Facebook sharer.php way of sharing content no longer accepts custom parameters. See response from a Facebook engineer.
It used to allow multiple parameters in this form:
http://www.facebook.com/sharer.php?s=100
&p[url]={url}
&p[images][0]={img}
&p[title]={title}
&p[summary]={desc}
So you could override the title, image and description that facebook would scrape from the page, but it seems these are now ignored.
Instead, Facebook now favours the opengraph tags on the page.
So why is this a problem?
This is my scenario: I have a gallery page with multitple images. I have a lightbox that loads an image when clicked, and when the lightbox is shown, I also show share icons for all the major social networks, including facebook.
The facebook sharer url is built up using the above format, so I pass in the specific image together with the image caption. These values are now ignored.
Feed Dialog To The Rescue?
The Feed dialog method of sharing is now the preferred method, and it supports passing in custom images and captions. It works perfectly in my above gallery scenario. But it has a limitation: it does not allow you to share the content on a page you manage like the sharer.php does:
So my question is...
How can I get the Feed Dialog to work like the sharer.php and give the end-user the option to share to a group, friend's timeline or a page he/she manages?
But it has a limitation: it does not allow you to share the content on a page you manage like the sharer.php does
It incorrect statement. You can post anywhere using the Feed Dialog! You can use the to parameter and give it the concerned id where you want to share the feed.
For example
PS Facebook has introduces Graph API v2 today, and introduced new Share Dialogs over Feed Dialogs. I'm not share if that's to your significance but you can have a look.
I found sites which are using like button to specific images from galleries and when you like them on facebook they display proper image buth without even using og meta tags???
How they are doing this???
Here is example:
http://www.subotica.com/slike/album-62834-omega-disco-subota-vece/
Try to like any picture and try to debug them on facebook debuger and you will see that there are no meta tags but crawled picture is proper!
They are using the old sharer.php endpoint.
http://www.facebook.com/sharer.php?u=URLENCODED_URL_TO_PHOTO
That endpoint is officially unsupported. For the moment it still works, but it could be removed at any time. You can accomplish something similar using the Feed Dialog or the proper og:meta tags.
Is there a way to change what the title text points to once it becomes a link on the facebook wall/message?
I'm using the bookmark.php link mentioned here: http://www.addthis.com/help/custom-buttons.
I set these meta tags, thinking "og:url" would set the title text link, but instead it only set the text that is between the title and description:
og:title
og:description
og:image
og:url
I found the answer to my own question: When using the share button (via FB.Share), you cannot override the from url unless you also are scraping the og (open graph protocol) meta values from that same page.
It might still be possible to override the values by using facebook connect and creating a Facebook application instead of just FB.Share. I'm not sure.