TMC
TMC

Reputation: 8154

Facebook returns empty data attribute when publishing Open Graph action

I am trying to integrate the new Open Graph objects, actions and aggregations into our site.

I have:

  1. Created an object and an associated action
  2. Added the correct markup to my page
  3. Verified the markup from #2 is valid in the Facebook Debug tool

When trying to submit the action for approval, it tells me I need to publish the action at least once. I tried doing that using the following request as in the documentation:

https://graph.facebook.com/me/<my-namespace>:<my-action>?<my-object>=<url-to-object>&access_token=<my-access-token>

The response didn't give me any errors but responded with an empty data attribute.

{
    data: [ ],
    paging: {
        next: "<paging-url-here>"
    }
}

I thought that perhaps the empty data in the response was indirect way to tell me it succeeded but when I look at my profile the action wasn't published, nor will Facebook let me submit the action (they still tell me I need to publish the action at least once).

I've verified the access token is valid, and in fact, I messed with it by removing a few characters and the request fails telling me the access token is invalid.

I'm obviously missing something obvious here, so would love some help!

Upvotes: 0

Views: 587

Answers (2)

TMC
TMC

Reputation: 8154

Facebook has a bug making GET behave differently than POST. If you're experiencing the same problem I am and using a GET, switch to a POST and it should work.

Upvotes: 1

Alex Himel
Alex Himel

Reputation: 61

That should work. Please file a bug at developers.facebook.com/bugs for what you're specifically seeing and we'll investigate.

Upvotes: 0

Related Questions