I use Graph API Explorer to get some feeds from my facebook page. So I have something like this:
GET ->/v2.2/my_page_id/feed
which returns me all the feeds from my page. At this point everything is well, the problem is that it returns not only the posts I posted, but also the posts other posted on my page.
What I basically want is to get only my posts which are placed in the center column without the other peoples posts on my page which are placed on the left column.
If I try this:
GET ->/v2.2/my_page_id/feed?fields=from{id}
I will get only the user ID who posted the feed, so I guess I have to put some kind of where clause like :
/where?from{id}=my_user_id
Can anybody help me with this? It seems such a simple thing but I lost lots of hours to make research about this where clause without any luck.
You should use
GET /{page_id}/posts
instead of
GET /{page_id}/feed
if you just want to Page's own posts.
See
https://developers.facebook.com/docs/graph-api/reference/v2.2/page/feed/
/{page-id}/posts shows only the posts that were published by this page.
Related
I did one sample to get page post using graph API. But it will fetch all the posts. For example, if the page shares anything from another page, it also fetched from api. I only need the post which is added by that page. Is the feature available in facebook API.
The below URL fetches all the post.
https://graph.facebook.com/page_id/posts?access_token=access_token
According to Facebook Docs for Page Feed
It clearly states that:
/{page-id}/posts shows only the posts that were published by this page.
/{page-id}/tagged shows all public posts in which the page has been tagged.
/{page-id}/promotable_posts shows only the posts that can be boosted (includes unpublished and scheduled posts).
Please check the docs properly and if you want to customize it more then you can do that at your end while parsing the results.
I would like to retrieve all facebook pages liked by a certain user.
The problem is that a /user/likes endpoint returns the list in parts (pagination).
Is there an option to display them all in one page? Facebook docs do not provide such info.
P.S. pagination does not seem to return all the pages. Some of them are missing.
10x.
There is no way to get all pages in one call, you have to use pagination. If pages are missing, you should file a bug.
Btw, you can also try setting a limit:
me/likes?limit=100
...but there is a max value for that, so you can never be sure to get all pages in one call without paging.
I'm looking for examples in reddit API. I want to pull images from a certain subreddit (http://www.reddit.com/r/VillagePorn) and put them on a webpage. I've seen other websites do it (mainly, imgur.com/r/*) and I can't figure out how.
I tried http://www.reddit.com/r/VillagePorn/.xml but that just returns the Thumbnail of the picture. Not even the link itself.
What should I do?
You can check out the Reddit API if you'd like. Any link can add /.json to the end of it and it fetches the information for that, including the source link for the picture.
I'm not sure how you're creating this page, but this question might help you out too.
We just implemented a Facebook like button everywhere on our site. However, it works a little bit weird on one of the pages.
If you click on the like button anywhere and then write a comment, it only posts once on Facebook. This is the correct behavior.
Unfortunately, on the another page it creates two items on your Facebook wall.
Has anybody previously seen the same problem on any site?
I use an iframe, and the link is what I call there:
www.facebook.com/plugins/like.php?href=%s;send=false&layout=standard&show_faces=false&;action=like&colorscheme=light&font=arial&height=35&appId=%s
The first %s is the current URL, the second %s is an appid.
Its a common bug, ive got a facebook like box too. And when i like my own page it will be liked twice. You cant do anything about it. Other visitors who like your page will only show up once.
friends,
how we can grab posts and comments from gplus business page ?
My page link look like https://plus.google.com/b/xxxxxxxxx/ .
I got the api to get details from an account using the following method.
https://www.googleapis.com/plus/v1/people/108189587050871927619/activities/public?key=yourAPIKey
but i couldnt find any thing for business page.
am using php for developing the code.
Thanks in advance..
A page is a "user" like any other - grab the ID displayed in the URL when you're browsing the page's posts, and look up the public posts for that id.