0

I am building a data warehouse that pulls data from both the OG Insights and Ads API.

Issue: I am querying the creative object in the Ads API which returns the story_id field for type 27 ads. For most story_ids that are returned I am able to do a OG query for the story_id and have a valid response returned. However, for some story_ids I get GraphMethodException.

Creative query:

https://graph.facebook.com/6003446971120?access_token=TOKEN

The token has been exchanged with user who created the ad and has advertiser role on the page which the story_id was posted to (based on the object_id of the creative). The token has the following scope: ads_management email manage_pages offline_access read_insights

Creative query returns:

{ "url_tags": "", "story_id": "123 - example", "type": 27, "object_id": "456 - example", "name": "REMOVED", "run_status": REMOVED, "preview_url": "REMOVED", "count_current_adgroups": REMOVED, "id": "REMOVED", "creative_id": "REMOVED" }

Query for story_id:

https://graph.facebook.com/123?token=TOKEN

I have tried 2 tokens, the first the the same as above, and the second is for a user that has the read_insights role on the project and has the following scope: ads_management manage_pages read_insights

Story_id query returns:

{ "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100 } }

It looks there have been many posts on the GraphMethodException error. The common issue is that the token is from a person that is restricted from seeing the content (page age wall, targeted post, ect). However, I think I should have full access to the page based on my privileges. I tried to validate this by having the page manager do the same query, which also returned the GraphMethodException error.

So the net net is - How can I have an creative referring to a story_id which I cannot get a valid response for?

Thanks guys,

Aaron

PS - I also tried querying 456_123 (the pageid_postid format a post) and I still get the same result.

Middas
  • 1,862
  • 1
  • 29
  • 44

1 Answers1

0

This exception does not necessarily relate to access permissions but can also mean that the object cannot be accessed.

For example, it is possible that a creative references a story which has been deleted. In this case, you will not be able to read the details of the story from the Graph API and this exception will be thrown.

You should check whether the story does exist or not by reading the graph for the page that this story was created under.

Paul Bain
  • 4,364
  • 1
  • 16
  • 30
  • Hey Paul - thanks for the response. I have read the page using page/posts and am not finding it there. Do you think this means that the object has been deleted? – Aaron M Jul 09 '13 at 18:58