How to change Facebook's shared title and message? - facebook

I'm new to Facebook Sharing API. When I put the Facebook Share button in my website, both the message and the title are the URL. Here's the screenshot:
There's even no thumbnails even though there's plenty of pictures in the page.
I have seen other pages that automatically use the first paragraph as the Facebook's message
Is there any specific site layout that I must follow?
Note: I'm using AddThis, so I don't think I can change the code
Thanks

The problem solved when I uploaded the site on Online server. Maybe the API has problem retrieving data from Localhost.
Cheers :)

Related

facebook graph page/picture edge returning questionmark

So this is a little bit odd, I have a website that trawls facebook looking at specific pages and requesting data from them.
As part of this I request the picture object of the page: http://graph.facebook.com/285361880228/picture
This returns a question mark instead of the page profile picture.
Other links to pages seem to work without a problem.
http://graph.facebook.com/1485760851674064/picture
Does anyone know what may be causing this?
I am currently using version 2.3 of the API.
I'm assuming it has something to do with the page setup, as according to the facebook documentation,I should be able to read this.
https://developers.facebook.com/docs/graph-api/reference/v2.3/page/picture/
It seems like the facebook page has not been published. Try publishing the page and access the image using same link. It will work.

Creating a Facebook App

I am building a website for a client. He has a Facebook page for his business. On the homepage of his site, he wants a feed that will pull in all the updates from his business' Facebook page.
Now, I felt this would be very easy to implement (maybe it is) but I have scoured the Facebook API for any simple way to do this. I am having a lot of trouble understanding which way I should do this. I've settled on using JS to access it, but have no idea where to go from there.
Do I need to create an app? If so, which options do I select so I can access the clients facebook page?
How do I get my app that I've created to show up so a user can authorize it? I have so many questions, and Facebook isn't very good at giving me answers.
Any help is greatly appreciated.
I would suggest you just use the facebook page's RSS feed.
Example
Take his page URL e.g.
https://www.facebook.com/pages/Lazery-Attack/6001014870
Take the number at the end of the url off, and plug it into the facebook feeds URL e.g.
https://www.facebook.com/feeds/page.php?format=rss20&id=6001014870
Voila, you now have an RSS feed you can integrate into the website you are building.
URL Breakdown
The URL is broken down the following way:
https://www.facebook.com/feeds/page.php?format={feedFormat}&id={PageID}
Vaid feed formats are:
RSS - rss20
Atom - atom10
JSON - json
Other Examples
Atom
https://www.facebook.com/feeds/page.php?format=atom10&id=6001014870
JSON
https://www.facebook.com/feeds/page.php?format=json&id=6001014870
Take a look at the facebook API, right here: http://developers.facebook.com/docs/reference/api/page/
You can give it a try here:
http://developers.facebook.com/tools/explorer/?method=GET&path=19292868552%2Fposts
The like box: http://developers.facebook.com/docs/reference/plugins/like-box/ also has the latest posts available
The simplest way is to add a Like Button to the page and make sure "show Stream" is checked on as this will show all recent posts. You can customise the appearance also (e.g. width, height etc).
No App or messy API calls needed!
Try it out here and simply paste the resulting code into your webpage:
http://developers.facebook.com/docs/reference/plugins/like-box/
Not an app, but the Facebook Social Plugins over here at Facebook For Pages

Facebook not fetching all images?

I have wordpress blog with twentyeleven theme setup. I have facebook button and I beleive all facebook garph api codes are exist in head part. Now the problem is there are more than 4 images exist on the page, but facebook like button only fetching one image everytime. And trust me that is a huge problem for me.
Can someone help me fix the issue.
here is the link if you wanna take a look at: http://j.mp/GSfWKb
thanks
While I can't confirm this is how Facebook approaches it, the og: meta tags only appear to work for actual like buttons, not Facebook sharing buttons (which are depreciated anyway).
According to this question you can try and put in a link tag and that may work for the share button you have. Facebook Post Link Image

How to prevent others from using my facebook application?

I just created a Facebook application that basically creates a new Tab on my Facebook-profile-page and loads contents from my website in an inline frame. Now I got to the point that I added the application to my profile page with a simple link like http://facebook.com/add.php?api_key=APP_ID&pages=1. But how can I prevent others from just doing the same and using my app on their pages then?
Thanks in advance!
Aha! You know the page that it is supposed to belong to, so hard code that in your app's code and you can check the page id coming in from the signed_request and see if that page id is yours. If not, send down not permitted in your response HTML. If it is your page, then response down the good HTML. :)
For more information on signed_request see: https://developers.facebook.com/docs/authentication/signed_request/

Facebook share URL code not working

I realize Share has been deprecated by Facebook, but this is still posted on their documentation:
https://www.facebook.com/sharer.php?u=[url to share]&t=[title of content]
However, the title won't change no matter what I do -- including adding the "og:title" meta and changing the actual title of the page.
Any suggestions on how I can make it possible for people to share my page with a suggested message? thanks.
I would encourage you to use the Facebook Javascript SDK, this will give you much more flexibility with what you share.
https://developers.facebook.com/docs/reference/dialogs/feed/