0

ページに投稿するためのpublish_stream、offline_access、manage_pages権限が(正しいアクセストークンとともに)あるのに、Facebookアプリケーションを介して自分のWebサイトのFacebookページウォールに投稿できません。

アプリケーションは「/page_id/links /」に投稿できますが、 「/ page_id /feed/」には投稿できません。

以下のコードを参照してください。

    graph = facebook.GraphAPI(settings.FB_PAGE_ACCESS_TOKEN_FOR_FB_APP)
    attachment = {}
    message = 'Hello! check the link!'
    site = Site.objects.get_current()   

    attachment['name'] = '%s' % idea.title
    attachment['link'] = 'http://%s%s' %(site,idea.get_absolute_url())
    attachment['caption'] = 'addressing problem "%s"' % idea.problem                
    attachment['description'] = '%s' % striptags(idea.desc)
    attachment['properties'] = {'See more': {'text':'Featured ideas', 'href':'http://%s' % site}} 
    # this works; posts to /fbpage/links/
    graph.put_object(settings.FACEBOOK_PAGE, "links", message=message, **attachment) 
    # this does not work; posts to /fbpage/feed/
    graph.put_wall_post(message, attachment, settings.FACEBOOK_PAGE)
4

1 に答える 1

0

この質問に 正しいアクセス トークンを取得するためのソリューションを投稿しました: How to get the access token to post for a facebook page via a custom application?

于 2012-09-07T11:43:15.293 に答える