admin link for managing likers of opengraph webpage disappeared - facebook

We have a pretty popular webpage about solar system http://www.solarsystemscope.com/
It has open graph tags, and a like button. and it has almost 90000 likers, to which we would like to post a news, that we are creating a new huge project about general education.
There WAS a admin page, where it was possible to access our fans. Now it disappeared, and we are not able to get it again.
We have checked the syntax and compared with the most common bugs,
we have rechecked it also with the lintner
we have tried many other things.
And we have no idea what to try next.
Everything looks correct, but there is no link to the admin page.
The object for the page is
http://graph.facebook.com/10150134043072528
ANY idea or hint what to try next is appreciated !
Thanks a lot!
mayo

I've come up against the same problem just today :)
You can figure out easily in three step:
Find open graph id for your webpage. Use https://graph.facebook.com for this.
Log In with the Facebook Username you use to admin your webpage
Follow http://www.facebook.com/{web page open graph id}
For example, entering into your browser (use firefox ;) :
https://graph.facebook.com/?id=http://www.solarsystemscope.com/
you'll get:
{
"id": "270906306253750",
"name": "Solar System Scope",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/276562_270906306253750_50107134_s.jpg",
"link": "http://www.solarsystemscope.com/",
"likes": 4132,
"category": "Website",
"is_published": true,
"website": "http://www.solarsystemscope.com/images/solarsystemscope_og_1.jpg",
"description": "Watch and Play model of Solar System Planets and Constellations moving over the Night Sky.",
"about": "Watch and Play model of Solar System Planets and Constellations moving over the Night Sky.",
"can_post": true,
"talking_about_count": 35
}
And after facebook login, follow this link https://www.facebook.com/270906306253750
Hope this helps

Related

Facebook Graph API not returning posts likes

I am trying to retrieve the number of likes for posts in a Facebook page. For instance, I am calling the following endpoint from Graph API explorer
nba?fields=posts{message, likes}
to retrieve posts from NBA page. But I only managed to retrieve message and id but not the likes. Is it because of new privacy policy?
`
{
"posts": {
"data": [
{
"message": "๐Ÿ˜ƒ๐Ÿ˜€๐Ÿ˜ฎ Does ANYBODY get better bench reactions than Klay Thompson??
๐Ÿ‘€: Golden State Warriors x Cleveland Cavaliers Game 3
๐Ÿ“บ: 9 pm/et Wednesday, #NBAonABC",
"id": "8245623462_10156593269718463"
},
{
"message": "๐Ÿ“ธ x #NBAFinals Game 2",
"id": "8245623462_10156593260853463"
},
{
"message": "Game 2 in #PhantomCam! ๐Ÿ‘€ the BEST of Stephen Curry, LeBron James, & more slowed all the way down.
NBAFinals presented by YouTube TV",
"id": "8245623462_10156592692223463"
},
{
"message": "George Hill added 15 PTS, 3 AST for the Cleveland Cavaliers in game 2 at Oracle Arena. #NBAFinals presented by YouTube TV",
"id": "8245623462_10156590505838463"
},
{
"message": "๐Ÿ—ฃ Stephen Curry somehow beat the shot clock with this WILD 3-pointer! Hear how it sounded around the world #GlobalGame ๐ŸŒŽ๐Ÿ€
`
https://developers.facebook.com/docs/graph-api/reference/v2.12/object/reactions
Likes are call "reactions" now ,(
thumb and , emoji reactions)
But I only managed to retrieve message and id but not the likes. Is it because of new privacy policy?
Yes. You will need admin access (page access token) now to get individual likes.
If you only want the number of likes though, you can ask for the summary field:
nba?fields=posts{message,likes.summary(1)}
And be aware, you will still need to get your app reviewed for Page Public Content Access, otherwise you wonโ€™t be able to get any info about pages you do not have admin access to. It works using above example link when using the Graph API Explorer app id - but as soon as you switch to one of your own, you will get an error saying you need PPCA, if the app in question isnโ€™t already approved for that.
Yes it is, more information than public available (by example the likes, now just called reactions) options will be closed soon.

Posts from Instagram not showing up on Facebook Open Graph API

I have an issue with Facebook OpenGraph API. Whenever I request data using either '/home' or '/feed', none of the posts from Instagram showed up.
I've been googling around and apparently some people raised the same issue with no solution yet. And I read some that the issue not only affecting posts from Instagram, but also other third-party app/device/platform.
Even the ticket posted on Facebook's dev page seems somewhat dead (no continuation). Link: https://developers.facebook.com/bugs/110563582419837/
If any of you guys also stumbled on this issue and has some ideas/pointers/links, please do share and let's discuss it.
Much appreciated. Cheers!
There are two bug reports in Facebook's bug tracker about this:
https://developers.facebook.com/bugs/110563582419837 and https://developers.facebook.com/bugs/202119973248747
The core reason is that the photos are attached to Open Graph actions as User Generated Photos and not via the regular Photo upload API.
As such, the regular photos permissions don't grant access to them and you need the user to specifically allow you the access their Open Graph activity for the app that posted the actions. The bug reports above are accepted on the basis that this appears to be an oversight in the case of actions with user generated photos, but it could also be by design in which case what i've outlined below as a workaround would be the only supported way to do this:
If you specifically need to request Instagram (or another Open Graph photos app) photos for a user, you can ask for Permission to access the actions posted by that app.
For Instagram photos you can do this by requesting the user_actions:instapp permission and once you've done that the Instagram Photos album will no longer appear to be empty, and the Instagram activity will appear in the feed connection.
To find out the namespace for an arbitrary app, access https://graph.facebook.com/<APP ID> and look for the namespace field,
e.g. for instagram, a call to https://graph.facebook.com/124024574287414/?fields=id,namespace returns:
{
"id": "124024574287414",
"namespace": "instapp"
}
A sample photo from my own /feed connection, retrieved with the read_stream, user_photos, user_actions:instapp permissions, is:
{
"data": [
{
"id": "[SNIPPED]",
"from": {
"name": "[SNIPPED]",
"id": "[SNIPPED]"
},
"picture": "[SNIPPED]",
"link": "https://www.facebook.com/photo.php?fbid=[SNIPPED]",
"icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yb/x/StEh3RhPvjk.gif",
"privacy": {
"value": ""
},
"type": "photo",
"object_id": "[SNIPPED]",
"application": {
"name": "Instagram",
"namespace": "instapp",
"id": "124024574287414"
},
"created_time": "2013-01-07T17:33:04+0000",
"updated_time": "2013-01-07T17:33:04+0000",
"comments": {
"count": 0
}
},
I can also access the /photos connection of my 'Instagram Photos' album with the same permissions, and can access all Instagram 'take' actions (i.e the photos) at /me/instapp:take
Facebook employee here. Looking at the internal task that is tracking this issue, all I can say at this time is that this is an issue that we are currently aware and investigating into. If you would like to be notified of any updates, be sure to click "subscribe" on the bug report.
For the time being, I recommend finding the album ID of the user named "Instagram Photos", then calling a GET request to /INSTAGRAM_ALBUM_ID/photos to get their Instagram photos. On the Graph API Explorer tool, I confirm that I am able to fetch all of my instagram pictures. Since my album is public, you should be able to view them as well.

How to correctly redirect to the facebook page tab URL after authorization

I have changed the way my facebook page tab app asks for permissions.
I was using the javascript approach with FB Dialog and now I am using the redirect approach (in which the user is redirected to a FB page where the permissions are asked and then is redirected back to the facebook page tab).
The reason of the change is that I believe this approach will present
less bugs and issues than using the javascript dialogs.
When using the redirect approach, I need to specify the URL that the user will be redirected after providing permissions. I would like that this url was the url of the facebook page tab with the app installed.
When building the url of redirect, I know the current page_id and my app_id. With these info, I need to build the facebook page tab url, which should look like this:
https://www.facebook.com/pages/PAGE-SLUG/{#APP_ID}?sk=app_{#APP_ID}
The problem is that I don't know what is the PAGE-SLUG. The tests I have run with the url above (using the PAGE-SLUG as anything) end up redirecting to the correct URL. However, knowing that Facebook is a very unstable platform, I would like to know it there is any better approach to building this redirect url.
EDIT: the above approach has a problem. The redirect loses the SSL protocol and uses the HTTP link when the facebook user doesn't use SSL by default.
It's very simple actually, you can call the Graph API with PHP like so:
$facebook->api("/{PAGE_ID}");
// change {PAGE_ID} to the page id you are redirecting back to
the return value is a json array with "link" in it -> that's the URL you are looking for :-)
Example Return:
{
"id": "XXXXXXXXX",
"name": "My Demo Page",
"picture": "",
"link": "https://www.facebook.com/pages/My-Demo-Page/XXXXXXXXX",
"likes": 123456,
"category": "Product/service",
"can_post": true,
"type": "page"
}
You can also query by the page name, if you know it, for example:
querying the Graph API with:
$facebook->api("/coca-cola");
Will result in:
{
"id": "40796308305",
"name": "Coca-Cola",
"picture": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/174560_40796308305_2093137831_s.jpg",
"link": "https://www.facebook.com/coca-cola",
"likes": 40680159,
"cover": {
"cover_id": "10150682306963306",
"source": "https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc7/s720x720/416803_10150682306963306_40796308305_9337341_812683101_n.jpg",
"offset_y": 0
},
"category": "Food/beverages",
"is_published": true,
"website": "http://www.coca-cola.com",
"username": "coca-cola",
"founded": "1886",
"description": "Created in 1886 in Atlanta, Georgia, by Dr. John S. Pemberton, Coca-Cola was first offered as a fountain beverage at Jacob's Pharmacy by mixing Coca-Cola syrup with carbonated water. \n\nCoca-Cola was patented in 1887, registered as a trademark in 1893 and by 1895 it was being sold in every state and territory in the United States. In 1899, The Coca-Cola Company began franchised bottling operations in the United States. \n\nCoca-Cola might owe its origins to the United States, but its popularity has made it truly universal. Today, you can find Coca-Cola in virtually every part of the world.",
"about": "The Coca-Cola Facebook Page is a collection of your stories showing how people from around the world have helped make Coke into what it is today.",
"location": {
"latitude": -33.816989983333,
"longitude": 150.84844081667
},
"can_post": true,
"checkins": 80,
"talking_about_count": 297576,
"type": "page"
}
Edit:
A more clear explanation:
Call the Graph API with the current page id.
If the result is no false, then the redirect_uri would be the link
returned from the call.
Otherwise, the redirect_uri should be yourdomain.com/middle-page.php?page_id=XXX
If the user then accepts the application and the redirect_uri is the middle page,
you then call the Graph API again, but this time, you use the Access Token received
from Facebook. now you should have the real page url and you can add any additional
details you need (like ?sk_app=APP_ID)
According to Facebook own documentation, It's not clear what happens if the user decided not no accept the application. I think the user will redirect back to the redirect_uri, which then you can check if you have "user_id" in the signed_request, but I'm not 100% sure... Creating a simple app demo and checking :-)

Displaying Different Copy / Images Based on the Number of Likes

We're working on developing a program that will (hopefully) automatically swap out creative with new creative once a certain like threshold is met (i.e. if 100 people like the page, something new appears). Can we add coding so our system is able to tell how many "likes" are generated? I know that the number of likes are displayed, I'm just not sure if there is a way for a program to actually read how many likes there are.
I don't see if in any of the Facebook attributes in the developer's platform.
What you'll have to do is acquire an access token for your page and then query the facebook platform for the number of likes periodically (possibly with a cron job of sorts).
You can read more about how to get the page access token at this URL
https://developers.facebook.com/docs/authentication/
Facebook has given us a great took to help us mine all the data it holds - its called the Graph API Explorer and with it you can see what data will be returned when you query the API. When you query the API with only the page_id you'll get a response similar to this :
{
"id": "XXXXXXXXX",
"name": "My Awesome Page",
"picture": "foo.jpg",
"link": "https://www.facebook.com/pages/XXXXXXXX",
"likes": 345,
"category": "Product/service",
"website": "XXXXXXX",
"founded": "2011",
"description": "...",
}
For more information about how to use the Graph API you can see this link :
https://developers.facebook.com/docs/reference/api/
Facebook does provide good documentation:
http://developers.facebook.com/docs/reference/api/page/
As you can see there, there is a field "likes" containing the number (count) of likes for a page.

Facebook platform: what data can I get?

I want to get some data from companies' Facebook pages, but I don't know what kind of data I can expect. Here is just a small set of properties I can use, although I can see that I can get more according to their official example:
{
"id": "19292868552",
"name": "Facebook Platform",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/50414_19292868552_7650_s.jpg",
"link": "http://www.facebook.com/platform",
"category": "Product/service",
"website": "http://developers.facebook.com",
"username": "platform",
"founded": "May 2007",
"company_overview": "Facebook Platform enables anyone to build social applications on Facebook and the web.",
"mission": "To make the web more open and social.",
"fan_count": 1522363
}
On the official site it is written:
Pages in specific categories have
additional fields depending on
category.
But what does that mean? Is there a finite set of properties that can be put on a page, or can a company choose what they want to put? Where can I get the complete list of fields that can be on a page?
Thanks,
Ivan
When you create a page inside Facebook, it lets you choose which type of page you want to create e.g. product, service, company, etc.
Depending on the category that you choose, I guess that there will be some instrinsic information fields for your page. Anyway, I don't think that one category is much different than the others, you should be fine with the standard fields that you have outlined in your question.