Open Graph error code 100 - facebook

I'm testing the open-graph with the tutorial, but I keep getting
"API Error Code: 100
API Error Description: Invalid parameter
Error Message: The app must have aggregation units with sample data in order to request the publish_actions permission"
URL: http://spimegen.appspot.com/
any idea..?
Thanks!

Go into your Open Graph settings for your app. Go to Aggregations. Click on "Preview" for your aggregation units. If any of your aggregation units come up empty (no actions/objects shown), add sample objects and sample actions. Once you've added sample objects and actions, you won't get this error.

if you're requesting the publish_actions permission one of the following must be true (as of Oct 2011)
Your app is in the games category, and you're using the permission for Achievements API or Scores API
You're testing the Open Graph Beta APIs, and you've defined actions, objects and a timeline aggregation for your app.

I am also hosting my app on the google app engine and experiencing the same 100.
UPDATE: Jeff Sherlock's answer did it for me. So it's not app engine related. : ] Thanks!

Related

Facebook Insights API Conversions are NOT matching Facebook Ads manager Results

When trying to fetch Facebook insights API for the following action offsite_conversion.fb_pixel_purchase I always get less number than Facebook show on their ad manager, I tried to inspect their network calls and URL structure and I see they're using the same field offsite_conversion.fb_pixel_purchase to show Results I am not sure why the numbers are mis-matching. I tried to query from the Graph API and from my shell with the same results.
You may check use_account_attribution_setting and use_unified_attribution_setting in here: https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group/insights
Setting use_unified_attribution_setting to true worked for me.
I did some testing and found out that if you use an additional breakdown, FB will return less conversions. There might be a bug in their API when you use breakdowns.
I tried getting offsite_conversion.fb_pixel_purchase with
'breakdowns' => 'hourly_stats_aggregated_by_advertiser_time_zone',
and facebook retuned 5 conversions.
if I remove the breakdown and get the data grouped daily I get 11 conversions which is what Facebook Ads Manager shows

Facebook Insights API not returning store visits data

I am trying to retrieve Store Visits data from the Facebook Insights API. Based on their documentation, these should be available by specifying the following parameters:
store_visit_actions
cost_per_store_visit_actions
When I use store_visit_actions as a parameter, no data is returned. I know data exists because it is displayed through their UI reporting tool.
When I use cost_per_store_visit_actions, I receive a 100 invalid param error:
cost_per_store_visit_actions is not valid for fields param.
These params are listed as "In Development", however, I'm retrieving other development parameters without issue. Is anyone facing the same issue or know how to fix?
this is because the metrics
store_visit_actions
cost_per_store_visit_actions
are deprecated in facebook api v11.0. You can checkout this link:
https://developers.facebook.com/docs/graph-api/changelog/version11.0/

Is fb graph user search api not working anymore?

https://graph.facebook.com/search?q=sharma&fields=name&type=user&access_token=
I was this URL along with access token and it was giving me user name list that i was using in my project. Only names are my requirement but when today i started to use it i am not getting any data nor any error.
Its only returning this
{
"data": [
]
}
Recently a month ago it was working for me.
Can anyone tell me if they have the same issue or if something has changed?
Is there any other was of getting users name mainly first + last name from fb?
I have found answer of my question which is Fb is no more giving user results for graph search api.
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#search-4-4
Search API
You can no longer use the /search endpoint with the following object types:
event
group
page
user
I dont know whether its a permanent revoke or temporary but it has something to do with Cambridge analytica data leak issue
https://www.google.co.in/search?biw=1360&bih=662&tbm=nws&ei=-iTXWrrkCYrxvgTTy5GgCw&q=cambridge+analytica+data+leak&oq=cambridge+analytica+data+leak
I hope it will help others to find out why their API is not working anymore.

Empty response to API call to Facebook Graph

I have been hammering away at this problem for the last day. I really hope someone can help me out. I would be very grateful.
What I am trying to do is fetch event data from a Facebook Page. I looked over the documentation, which says this about reading Pages data:
Reading
A Facebook page
Permissions
For pages that are published, you need:
An app or user access token to view fields from fully public pages.
So what I did was I obtained an app access token via:
GET https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID
&client_secret=YOUR_APP_SECRET
&grant_type=client_credentials
which then returned
access_token=MY_APP_ID|MY_APP_ACCESS_TOKEN
After this I followed the documentation and made the following call
https://graph.facebook.com/v2.4/129511477069092/events?fields=id,cover,name,venue,description&access_token=MY_APP_ID|MY_APP_ACCESS_TOKEN
This returned:
{
"data": [
]
}
So after some fiddling around I was able to make the call by switching to version V2.2 and by creating an access key with Facebook API Graph explorer tool(no permissions granted).
GET https://graph.facebook.com/v2.2/129511477069092/events?
fields=id,cover,name,venue,description&
access_token=ACCESS_TOKEN_FROM_FACEBOOK_API_EXPLORER_TOOL
The page I am trying to retrieve data from is public and so are the events, so I can't figure out what is going on. I know I am super close since I am able to retrieve the data with the token provided by the Facebook API Graph Explorer Tool. The thing with using this token is that it only last a few hours and I need something that is going to last longer such as an app access token. I have done some research on Stackoverflow and found similar questions, but none of them solve my problem. Any help will be appreciated to the max! Thanks.
Looks like a bug of v2.4 to me. It works with v2.3 if you remove the deprecated venue field:
https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=129511477069092%2Fevents%3Ffields%3Did%2Ccover%2Cname%2Cdescription&version=v2.3
If the version is changed to v2.4, it returns an empty result.
https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=129511477069092%2Fevents%3Ffields%3Did%2Ccover%2Cname%2Cdescription&version=v2.4
There's no documentation about this in the changelog at
https://developers.facebook.com/docs/apps/changelog#v2_4
so I guess it's a bug. There's already a bug report at
https://developers.facebook.com/bugs/443054055873667/
with status assigned. If you have an app that supports v2.3, I'd suggest you prefix your request like this:
GET /v2.3/129511477069092/events?fields=id,cover,name,description

Facebook Publishing Score

I am trying to publish scores from my app. But unfortunately I am unable to do so. I even tried using the code snippet at http://developers.facebook.com/blog/post/539/ but for some odd reason it didn't work for me. If someone can provide me with some basic guidelines I would really be helpful as that would help me build upon that system and move forward. I don't want any fancy publishing technique I am just looking forward to publishing score at the end of the game.
Using https://graph.facebook.com/user id/scores?score=10&access_token=acess_token returns
{
"data": [
]
}
Your example looks like a HTTP GET request (i.e. 'show me the scores of this user')
To update a score you either need to make a POST request, or 'fake' the POST request by adding ?method=post to your GET call
You'll also need to use an App Access Token, the instructions for obtaining this are at:
https://developers.facebook.com/docs/authentication/#applogin
I've done it using javascript sdk, you can check out the source code for my game
https://apps.facebook.com/tgif-game/
you should be checking out scripts/gameui.js for the calls to posting scores and getting the list of scores.
In the FaceBook Developer Dashboard set your app category as games.
Then only you'll be able to post scores.