0

I'm unable to post to my website's facebook page wall via my facebook application even though it has the publish_stream, offline_access & manage_pages permission for posting to the page (along with its correct access token).

The application is able to post to '/page_id/links/' but not to '/page_id/feed/'.

See the code below:

    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

我在这个问题中发布了获取正确访问令牌的解决方案: 如何通过自定义应用程序获取访问令牌以代表 facebook 页面发布?

于 2012-09-07T11:43:15.293 回答