0

我从 Github 下载了一个在 facebook 上发布帖子的脚本,我使用 Api 令牌和组 ID 对其进行了配置,但是当我运行它时,出现第 41 行的语法错误,我无法找出错误的位置是。

#-*- coding: utf-8 -*-
import time
from facepy import GraphAPI

api = ""

graph = GraphAPI(api)

message = '''

Add all your contents to be posted to facebook groups here

'''


# Find the ids of your desired groups from http://lookup-id.com/  
# and add this in this array groups

groups = [ '273873207240416' ]


for group_id in groups:
    print "Posting to " + 'https://www.facebook.com/groups/' + str(group_id)
    graph.post(path =str(group_id) + '/feed', message=message)
    time.sleep(10)
print "Done"

Github上的源代码链接

4

0 回答 0