最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Facebook graph api and newly defined objects and actions : message: "Unknown path components" - Stack Ov

programmeradmin3浏览0评论

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 ponents: /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 :

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 ponents: /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./tvsport

Share Improve this question edited Nov 27, 2011 at 16:27 RichieHH asked Nov 27, 2011 at 16:08 RichieHHRichieHH 2,1234 gold badges29 silver badges31 bronze badges 0
Add a ment  | 

2 Answers 2

Reset to default 9

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.

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

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论