简体   繁体   中英

Access statistics from a Facebook Business account

I am the website developer for a company and I want to show statistics from social networks on our site. Facebook has put me through a loop. The fb account was created as a business and I know now that business accounts cannot create or edit apps with the FB API.

Is there any way access analytics/statistics without an App ID and secret? or do I have to make a personal account to use the FB API?

A good example of this is Blackberry's Community page. I can't tell if they have a personal or business account but it is exactly what I would like to achieve.

If all you're after is the number of fans, then this is a doddle.

Take a look at the JSON data for Blackberry's Facebook page:

https://graph.facebook.com/blackberry

There's a likes chunk in the JSON data (notice you don't need to be authenticated or require any access token or app id).

To get this for your Page, replace blackberry in that URI with your Page's short name or Page ID and you'll get a similar JSON chunk back. Here's Nike's: http://graph.facebook.com/nike

You can fetch this with JSONP on the frontend, or grab the response on the server side and parse it there (probably a good idea to cache it if you do).

Anything more than that will need an App ID, an access token and some FQL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM