Facebook API : page feeds - facebook-graph-api

I would like to integrate Facebook page's feeds to my website.
I'm trying to use the Graph API, everything works fine, but I cannot get the attached pictures (picture field).
/v2.6/{page_id}/feed
But I only get the id, created_time and message fields.
Can someone helps me with this ?
I probably miss something but I cannot found what.
Thanks by advance.

/v2.6/{page_id}/feed?fields=message,picture,...
You don´t get the additional fields if you don´t ask for them.
Existing fields: https://developers.facebook.com/docs/graph-api/reference/v2.6/post

Related

Facebook Graph Api: Get Pages I am Admin Of

I have searched about this topic a lot, but I did'nt got any solution that suits my needs.
What I want is, when I call me/accounts , it gives me all the pages and apps I am associated with. But the thing is, I want to get only those pages of which I am an Admin not those in which I am linked as a Developer or a QA. I got a workaround to use isAdmin method once i get the page ids, but that takes a lot much time to check for each page.
Can I get something that can help me to get all pages I am admin of in one call. Its really critical.
Thanks for your help in advance guys.
You can do this pretty easily with FQL.
SELECT page_id, role, type FROM page_admin WHERE uid=me() and type != 'APPLICATION'

Facebook graph API to get get posts from Pages

I'm struggling in getting the posts from the public page in Facebook. For example
https://graph.facebook.com/cocacola
(Its a public page, those who liked it on facebook will get update.)
This returns me the page details only. How I can get the wall posts done by the user "cocacola".
Its quite simple. just do as
https://developers.facebook.com/docs/graph-api/reference/v2.2/page/f‌​eed
It will work.
I'm a bit late at the party but for completeness I would like to add:
Using the latest version 2.2 you can access the feed via the page id, eg:
https://graph.facebook.com/v2.2/PAGE_ID/feed?access_tkoen=YOUR_ACCESS_TOKEN
Individual posts can be retrieved too by their own id or via the feed.
https://graph.facebook.com/v2.2/POST_ID?access_token=YOUR_ACCESS_TOKEN
Maybe this was also possible with the older versions? Don't know, I'm just getting started.

post on facebook wall through php application

I am going to develop a site where I want to subscribe users from facebook.
If the user subscribe successfully then application will post on his wall when something new happen in our site.
can anybody help me about this.
Thank you in advance
you will need to request "publish_stream" permissions from the user. Read the information about 'publishing' in this link.
The call will look something like this (using the facebook sdk) :
$facebook->api('/'.$user_id.'/feed','post',$post_details);
where $post_details is an array containing pictures, descriptions, links... etc..
Read from the link - it is all explained there...
Good luck!

Facebook Page - Get Post feedback and impression via Graph API

I'm trying to get some insights on a list of Posts by a Page on Facebook.
To be specific, I want to get the information highlighted in this blog post via the API.
But I can't figure out how, anyone knows how?
As far as I know it's only possible using the "stream" table. So you've got to use FQL to query this data. Using this technique you'll only get the impressions directly. Feedback rate can be calculated by adding #comments and #likes and dividing the result by #impressions. Hope they'll add this to the insights graph api as well.
MartinHN
Refer to https://developers.facebook.com/docs/reference/api/#analytics
If you are trying to aggregate multiple pages or a page other than the requesting app then you may need grant read_insights permissions to your application.
Refer to http://developers.facebook.com/docs/reference/api/insights/

Getting users who like a web page with Facebook graph API

I'm struggling with the Facebook API. What I want to do is to be able to look at a user's feed, see which web pages they clicked "Like" on, and then get the other users who like the same web page. I'm having two problems.
1) Whenever I get the feed of a user, all of the "Likes" are removed from the feed. Its very frustrating because its like Facebook will give me everything except for exactly what I'm looking for!
2) I can't seem to get a list of user IDs who like a certain URL. I've tried using FQL like this:
SELECT user_id FROM like WHERE object_id=114324145263104
As was suggested in another SO question, but that returned nothing on all of my attempts.
Does anyone know how to do this, or if its even possible? Thanks for your help!
There is a different query for getting the linkes of a url
SELECT url FROM url_like WHERE user_id = me()
In your case it is.
SELECT user_id FROM url_like WHERE url = "http://www.domain.com/"
I had the same problem. This is what i do
https://graph.facebook.com/URL
OR if you have multiple URLs click to
https://graph.facebook.com/?ids=URL1,URL2,URL3