简体   繁体   中英

Getting #<FbGraph::InvalidRequest: OAuthException :: Unknown path components:

I'm using the FbGraph gem with Rails. Every time I try to publish an action, I get this error:

[OpenGraph] Publishing publish #<GroupComment> (valid user token)
[OpenGraph] #<FbGraph::InvalidRequest: OAuthException :: Unknown path components: /gaymerx:publish>
OAuthException :: Unknown path components: /gaymerx:publish

Custom log format, but the error is as printed. gaymerx is our app's namespace, and we've created the publish action (though we have to post some 'publish' actions to fb before we can submit it). Verified that the user token is valid, and has open graph permissions.

Here's the calling code:

me = FbGraph::User.me(@token)
action = me.og_action!("gaymerx:#{action}", :custom_object => "http://www.gaymerconnect.com/action")

Any idea what could be going on?

It looks like you're missing part of the request path

You have /gaymerx:publish but if your app namespace is gaymerz and your action is publish you should be posting to /me/gaymerx:publish or /<USER ID HERE>/gaymerx:publish

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