Can we see the posts of a page that a particular page likes via fb api? - facebook-graph-api

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.

Related

Use FB API to get the pages that a page likes?

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

What's the difference between the Like button with or without Open Graph META tags?

I have a very basic website with the potential for having hundreds of pages, and would like to have a the Facebook Like button on each one.
However, before I do it, I would like to know the difference between inserting the Like button with, or WITHOUT using Open Graph META tags.
I don't want each page that visitors 'Like' to become their own Facebook pages, but I WOULD like their 'Like' to show up on their wall so their friends can see it.
Is the only real reason for using Open Graph to specify what exactly it is that you want to show up in the message and 'Like' post?? (example: 'Dave likes The Rock - IMDB' with a picture of the movie and a description underneath.)
#Vali What you are suggesting:-
Including Open Graph tags on your Web page, makes your page equivalent to a Facebook Page. This means when a user clicks a Like button on your page, a connection is made between your page and the user. Your page will appear in the "Likes and Interests" section of the user's profile, and you have the ability to publish updates to the user.
is not possible. Kindly see my similar question:
Convert my Site to Facebook Graph Object
As you said you can add a Like button without OpenGraph. That's the easy way and with that you don't have any future connection with the person who liked your link/page.
Including Open Graph tags on your Web page, makes your page equivalent to a Facebook Page. This means when a user clicks a Like button on your page, a connection is made between your page and the user. Your page will appear in the "Likes and Interests" section of the user's profile, and you have the ability to publish updates to the user.
Using Open Graph you have a greater control on what you want to appear on that person's wall.
Open Graph is still beta. If you want to use OpenGraph you need to create a FB app, get the APP ID and add it to your webpage. If you want to use the simple Like button, you just add the fb:like tag and that's all.
don't want each page that visitors 'Like' to become their own Facebook pages
This will not happen. You're the single admin of your page.
Is the only real reason for using Open Graph to specify what exactly it is that you want to show up in the message and 'Like' post??
Yes, you can do this with Open Graph. I suggest using Open Graph if you want to post enhanced wall posts and if you want to get connected with the users who likes your page.

Facebook Like button og:image needs to be scraped to be displayed

I've got a Drupal website with articles on them which have Facebook like buttons.
Now I've got all the OpenGraph metatags added on the pages and it's all working perfectly except for one thing.
Site visitors can share a page URL or like a page URL.
When a new article is added and the first person who presses the like button will not see the image added in the og:image tag.
If another person afterwards presses the like button, the og:image however is visible so it seems to me Facebook needs to scrape the page first before the og:image is added in the 'Facebook Like window'.
The Facebook share doesn't seem to suffer from this problem and does it right from the first time.
Now whenever somebody adds a new article, I'd need the URL of the article to be scraped automatically by Facebook using some PHP code or some other fix...
Anyone who knows if autoscraping a URL is possible or does anyone have an idea for a workaround?
You can use the graph API with scrape=true to force Facebook to scrape you right when you create your contents
https://developers.facebook.com/docs/beta/opengraph/objects/

Insights for pages that have been liked

So I would think this would be an easy thing to do, but I'm completely lost right now. I have a website. It has a facebook page. That fb page has a bunch of likes and all is good. We also have the "like" button on various webpages throughout our website. If I go to those webpages individually, I can see how many people have hit the like button, but I have not found any where to see some reports. Ideally, I'd like to see:
The most popular (liked) webpages on our website
The total number of interactions (likes) across my domain
The same basic demographic information that is available for our fb page
We have had the like button integrated for a few months now, but I'm not sure if it should be linked to our fb page or if I have to create a custom app to associate it with. Right now we have it assigned to our fb page.
Is this possible?
It's possible, but requires a few steps:
Claim insights for your domain: http://developers.facebook.com/docs/insights/#claiming_a_domain
Grab your domain ID: http://developers.facebook.com/docs/reference/fql/domain/
Access insights using the graph API

Multiple Facebook Likes - Have to link to 1 Facebook Page?

Ive made a website which you can 'like' and this is linked to the Facebook Page.
Is it possible to have individual blog posts 'liked'? If so, how could I still link these to the Facebook Page in some manor?
Thanks
You can set up Like Buttons for individual blog posts as long as each post has a distinct URL (which should be the case).
You cannot simultaneously Like a blog post and a Facebook page. A Like exists between one user and one Facebook object: http://developers.facebook.com/docs/reference/fql/like/
If you want to increase your Facebook page Like count, you can either direct people to the page itself or add a Like Box to your blog.