Publishing links using Facebook graph API display feed as attachment on Facebook fan page - facebook

I am try to publish link on Facebook fan page using graph API but it displayed as attachment not as normal feed which display thumbnail.
Where as when I try to publish same link on users wall it display properly showing image thumbnail.
Can any one tell me why Facebook graph API work differently.
Feed publish on FB fan page :
Feed on user wall :

Thanks to all, I am finally able to solve this issue, the issue was I am using {page_id}/feed method to publish link for video and image, which displayed as attachment on Facebook fan page.
Solution : {page_id}/links with parameters [link, message, picture]

Pls provide params you include in request to facebook. Maybe providing params as shown in answer to following question helps, i.e. picture?
Posting an embedded video link using the Facebook Graph API

Related

How to get "Send Message" button in Facebook Page Post or Image Share via Graph API?

I am trying to automate Post and Shares in Facebook Page's feed using the Graph API.
For simple posts in feed like text and link I was able to do it with no struggle.
(Based in this: https://developers.facebook.com/docs/graph-api/reference/v2.10/user/feed#publish)
Then I got into making a Share of photo or video. Again not a problem. But I have noticed in Facebook Page itself it is possible to add a Send Message button. Where it even has a label with "Add this button to your post so people can reply directly in Messenger."
Facebook create post in Page
I was looking in the actions sections and other places and I found no way to add it via Graph request.
Currently, I am generating the Post via Graph like this:
POST graph.facebook.com/v2.10/MY_PAGE_ID/photos?access_token=PAGE_TOKEN&caption=MY_TEXT&url=IMAGE_URL
It it possible to add the Send Message button via Graph? Or this is only restricted to Facebook UI?
Thanks for the help!
Use this endpoint /page-id/feed https://developers.facebook.com/docs/graph-api/reference/v3.0/post
call_to_action parameter should be
{"type":"MESSAGE_PAGE","value":{}}

Facebook photo feed

I was using FB api to post photos to my fanpage's news feed (http://www.facebook.com/MyApp/photos_stream), but from some time it stopped posting it to news feed and it just uploaded photos to some album (http://www.facebook.com/MyApp/photos).
This is the api command I was using before and after it was working, nothing has changed on my side.
$result = $facebook->api('/123456789/photos', 'post', $attrs);
So the question is, how to post photos to fanpage wall (timeline) properly and why it stopped working by itself?
Thanks
I had the same problem a few times ago.
In fact it was working but you have to go to your photo folder and accept the uploaded image.
In the album Facebook will show you a panel saying you have to approve those photos.
By doing this Facebook will publish the images on the timeline.
I know this is very annoying but I didn't find a better solution (I think Facebook has added a new security to avoid some abuses).
EDIT:
Look at the Facebook documentation.
You can post photos to a Page's Wall by issuing an HTTP POST request
to PAGE_ID/photos with the publish_stream and manage_pages permissions
and the following parameters.
Make sure you are using those two permissions and that your parameters are correct.

Uploading an image to friends' wall using Graph API

I would like to know the Graph API equivalent of the following action :
Go to a friend's profile page, click on "Add Photo" on their wall, then "Upload Photo".
I can upload images to my own wall and to my own albums, and I can also post messages and links to my friends' feed, but I can't figure out how to do this.
Any help would be greatly appreciated.
Thanks.
I was able to do it setting a "target_id" parameter, and uploading the image to "graph.facebook.com/me/photos". Then it does show up exactly as if it had been done the manual way.
The only thing I'm not sure about is if "target_id" is some legacy parameter from the REST API that will become unsupported in the future...
I believe that process adds a photo to one of your albums; then attaches that to a Post on your friend's 'feed' connection
You can find documentation for both of those steps on the developer site:
Upload Photo: https://developers.facebook.com/docs/reference/api/user/#photos
Post on wall: https://developers.facebook.com/docs/reference/api/user/#posts - see the 'object_attachment' parameter here

Display and post comments on facebook photo from webpage

We would like to use the Facebook Comment plugin (or something similar) on a website. The photos are being pulled in from Facebook to our site (built in PHP). We would like to enable commenting on a particular photo and post the comment back to Facebook. Addtionally, if a comment is made on Facebook, we would also like for the comment to display on the webpage.
From the website, we have only been able to get the comment to apply to the webpage, but not to the photo itself. Thus the comment posts on facebook with a link to the webpage, but does not display the individual photo.
Does anyone know how to successfully post comments on a particular photo from a webpage?
Using the Graph API, just do an HTTP POST to https://graph.facebook.com/PHOTOID/comments?access_token=ValidUserAccessToken with the correct parameters specified (such as message) as well as a user access token with the correct permissions specified.
See the comments connection of photo at https://developers.facebook.com/docs/reference/api/photo/

facebook like not get the required image

I am creating a facebook like to put on my site. This component will read all posts from a specific page`s wall and display them.
I want to get the required image post on my wall when any user like my page from my website.. I have multiple facebook likes on my page ..
My problem is that when a user like any of the like button it get any image from my page and post it my wall . But i want that it get the specific image and post to my wall..
i also tried to put og:image But no success :-(
Any suggestions please.
You haven't given enough code to diagnose your problems, but assuming that you've followed the open graph instructions on the Facebook Developers site - http://developers.facebook.com/docs/opengraph/ - It would be a good idea pass your target URL through the Facebook Debugger (formerly the URL Linter) it will help show you any errors you have regarding your open graph tagging implementation:
http://developers.facebook.com/tools/debug