Delete multiple posts from multiple pages facebook graph API - facebook

I'm thinking about a scenario like this, I have multiple Facebook pages, and I have the access_token(s) for each page ( with manage_pages and publish_pages permissions ), and I have a list of post_id(s) from each page, now I want to delete all post at once from each page. For this in graph API Facebook provides
DELETE https://graph.facebook.com/546349135390552_1116689038356556
?access_token=your-access-token
Obviously I can call n number of requests to delete n number of posts from n number of pages but, Is there any way to do this in a single API call?

Edited: have a look the Batch API endpoint, https://developers.facebook.com/docs/graph-api/making-multiple-requests/

Related

Is there a way to count the number of times each individual Facebook Friend has liked your Facebook posts?

Iam trying get the number of times each individual liked my particular post.
It seems that it is possible to get the overall like count of a page.
But I dont need the overall like count. I want in specific data of a user who liked my posts.
I tried these links
How can I get fan page likes count using graph api?
Getting the Facebook like/share count for a given URL
How to get Facebook likes count for a Facebook page?
I am just writing the answer which is mentioned in the comment. Because that's the answer.
No, that is not really possible. Each of your friends would have to
sign in to your app and grant it permission to read their likes, and
you would need to have valid individual user tokens available for all
of them each time you want to request this data, because “A User or
Page can only query their own likes. Other Users' or Pages' likes are
unavailable due to privacy concerns.”
developers.facebook.com/docs/graph-api/reference/v3.3/object/

Facebook Graph API - Getting the number of likes of pages using Search API (Different Access Tokens behaving differently)

I am trying to get the number of likes for Facebook Pages searched by a keyword.
https://graph.facebook.com/search?q=paul&type=page&fields=likes&access_token=xxx
I have tried with two different tokens (with no data permissions), 1) generated from Facebook Graph API Explorer, and 2) generated from Facebook Login Button (after developing a facebook app).
The above API request gave total number of likes when the first token is used.
first token responseAnd it gave likes object with paging(without total likes) when the second token is used.
second token response
I need to get total number of likes for a page when the second token is used. Can someone help me, or shed some light?
It is fan_count, not likes (since v2.6 of the Graph API):
/search?q=paul&type=page&fields=fan_count
You are most likely using different API versions.
Check out the API reference for the existing fields: https://developers.facebook.com/docs/graph-api/reference/page/

Retrieve all liked objects from Facebook Graph API

Is it possible to get a list of all liked objects using the Graph API? I want to save a list of any articles (ie. items with URLs) the user has liked (say, in the past week). I've tried:
/me/likes - this is liked pages only, not other items
/me/feed - this is posts by the user only, not others
/me/home - this might be possible, but seems to be deprecated
If I understand what you're trying to get correctly, you can probably use the /me/og.likes Graph API endpoint. You'll need the user_likes permission for this.
The /me/likes endpoint returns Facebook Pages that the user likes, while the /me/og.likes endpoint returns any posts/links that the user has Liked (i.e. performed an Open Graph Like action on).

Determine first 50 likes via Facebook Graph API

Is it possible to get for example the first 50 people who liked a post, photo, whatever I created on facebook via the Graph API? Is there any kind of order when accessing connections like /likes or /comments?
Use the following link (given that you have permissions to access to the post):
/likes?limit=50
This should be the first 50 likes ordered via Facebook (usually based on time).
ASFAIK, you cannot get a list of people who like a page. It's a privacy issue. If you wanted to create an app, and users authorized your app, then you could get a list of the current users friends who like the page.

how can i get all the FB graph id's associated with a domain?

taking imdb.com for example. imdb.com has hundreds of pages with a FB graph ID (one per each movie)
I want to fetch ALL FB graph ID's belonging to imdb.com.
for example: the FB graph ID for http://www.imdb.com/title/tt1515091/ is "113109502056333"
I know this because I can "like" the URL, then using the "Graph API Explorer" I can see the ID of the liked URL.
Question: How can I get ALL FB graph id's of URL's belonging to a single domain? please use imdb as an example.
keep in mind, I do NOT want to send FB a batch of predetermined URL's. My website has hundreds of URL's and will not be able to compile a list of all URL's.
Thanks!
You can't! There is no way to get all OpenGraph objects that reside under the domain via Graph API or FQL.
OpenGraph pages are linked to URL and not to domain.