Facebook graph api and newly defined objects and actions : message: “Unknown path components”

偶尔善良 提交于 2020-02-04 04:24:08

问题


I have defined an og name space, og_shamh, and an action "watch" using the FB app editor. I have called a javascript function (below) which attempts to create an action object. But I get :

["error response from fbCreateAction", 
Object
error: Object
message: "Unknown path components: /og_shamhh:watch"
type: "OAuthException"
__proto__: Object
__proto__: Object

The javascript function called with "og_shamhh" and "watch" is:

function fbCreateAction(action,url){
    FB.api('/me/'+og_namespace+':'+action+
           '?recipe='+url,'post',
           function(response) {
           log("error response from fbCreateAction",response);
               if (!response || response.error) {
                   alert('Error occured');
               } else {
                   alert('Post was successful! Action ID: ' + response.id);
               }
           });
}

Is there something i need to do on the facebook side that my app can use my actions? I am myself logged in and am an app admin. is this something to do with needing to submit my actions for approval?

You can see the relvant meta data, header etc here : http://www.shamrockirishbar.com/tvsport


回答1:


This error occurs when either the namespace or the action (or both) in the api url are wrong.

To make sure you access the good url, check the Get Code link near the action you want to perform in the Action Types section of the Open Graph tab of your app's settings.

Alternatively you can check out: Open Graph > Dashboard > Your Action Type > Advanced Settings at the bottom of the page.




回答2:


Problem solved and others now pending. It turns out I had, duh, changed the action name.... Silly



来源:https://stackoverflow.com/questions/8286897/facebook-graph-api-and-newly-defined-objects-and-actions-message-unknown-pat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!