I've been looking at the documentation for the FB API as it pertains to pages to see if I can get the pages that given page likes and all I can see is a field that lets you get the number of users who like a given page. But, I can't seem to find a field that returns an array containing the ids and names of pages that the page itself likes. This works fine in the API explorer when trying to get the likes of a users.
I just use GET
/me?fields=likes
But, for a page... it doesn't seem to work.
Any ideas?
Put page id, instead of me:
https://graph.facebook.com/PAGE_ID/likes
Example: https://developers.facebook.com/tools/explorer/?method=GET&path=6815841748%2Flikes
Cheers
Related
I would like to achieve the following:
GET all posts from a page and their related content (attachments, likes, visibility, tags, shares, comments, creation time...)
POST all that content in a new page
Assuming that I am admin of both pages.
I know that it's pretty straight forward to loop over the feed of a page and get all the posts' information. However, I'm not so sure about the POST part:
I guess that Facebook doesn't allow to "clone" people's
like/shares/comments below each post, on their behalf?
Considering that I will delete the first page, will all attachments disappear from Facebook's servers as well?
You cannot post in behalf of another user. And you cannot get all information you need with the Graph API.
What about renaming the page? If you like to delete the first page and clone it before, it looks like a rebranding or something ...
I have a fb page and i have liked some of the other pages like laughing colors.. Now as if i go in my insight tab then it shows the top posts of those pages that i like. For example, look at the image below:
top post from a page that my page likes
I also want to read the data (top posts) from the page that my page likes. Can it be done using fb api? If yes, then how?
Get list of pages that your page likes = that is going to be GET <page_id>/likes in graph api. (try it here: https://developers.facebook.com/tools/explorer/)
Loop through the pages from step 1 and get their last post via <liked_page_id>/posts.
Overall you will need to play with the API but it should not be very hard.
I'm using Java for searching public page info in Facebook.
I chose for now to use the Facebook4J but this is not a must.
I succeeded to search for pages named "Some Name" and I would like to read the is_verified property of the page to make sure this is the official page I'm looking for and not a faked one.
There is no isVerified() method on Page object and I do not how to run a FQL query using the search API.
This FQL runs well in Facebook simulator:
select page_id, name, is_verified, is_community_page
from page
where name='Tom Cruise' and is_verified=1
The Java code I'm having right now is this:
ResponseList<Page> pages = facebook.searchPages(personName);
I tried copy-paste the FQL into the search as parameter, as the method signature is
ResponseList<Page> searchPages(String query) throws FacebookException;
but I get no results...
I also cannot loop on all 'Tom Cruise' pages and ask whether they are verified or not because, as I mentioned before, there is no 'isVerified()' method on Page.
I'll appreciate any Java solution, even if it means that I should drop Facebook4J for another platform.
The is_verfied page field is added with RestFB version 1.10.0.
I would like to know If it's possible to add a Check in on Facebook with PHP but without any Page id.
Because I have a database with a lot of places but I do not have a corresponding Facebook Page Id.
ANy idea?
To my knowledge, it is not possible to do a Check In without a page_id.
You can refer to How to get place_id before checkin? to find out how to get Facebook Page Id for your places.
Was wondering if anyone knows how to get the historical data for any Facebook Page.
For example, number of fans for RedBull fan page on a given day in the past or for a given period that ends today so that I can show fan development of any page over a given period.
I tried it with the graph API and FQL (insights) but no luck.
https://graph.facebook.com/{USERNAME}/insights?fields=likes&period('week')&end_time_date('2011-06-26') --> empty result
Pulling the data via FQL also returns no results, plus it seems without a read_insights permission nothing is possible for page data
I'd need this to be available with only a generic user access token. This data is publicly available anyway. Result should be somewhat like this: http://www.socialbakers.com/facebook-pages/australia/
https://graph.facebook.com/{{pagename}}/insights/page_views?access_token={{access_token_key}}&since=1420070400&until=1421625600
Since & until parameter in the above code takes in unix time.
add necessary information in the {{ }} and this code should work.
Without insight permission I recommend that you write something to perform a nightly query on the page graph and record the stats you need. If the page is public most of the information shown on that site is available.
You could also scrape info from http://pagedata.appdata.com if the page has already been listed...