首页 文章

无法通过应用程序发布到Facebook页面的订阅源

提问于
浏览
0

即使它具有发布到页面的publish_stream,offline_access和manage_pages权限(以及正确的访问令牌),我也无法通过我的Facebook应用程序发布到我的网站的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)

1 回答

相关问题