我有一个帮手。获取 facebook fanpage 的列表。前几天上班,突然停了。我在拍了一张粉丝专页后就停下来了。我收到此错误:
type: OAuthException, code: 100, message: (#100) Invalid Connection [HTTP 400]
这是我的帮手
def self.download_fanpages(user_id)
#API Facebook
@graph = Koala::Facebook::API.new(Client.find(user_id).access_token.to_s)
#download list of fanpage
for facebook_page in @graph.get_object("me/accounts/page")
@graphs = Koala::Facebook::API.new(facebook_page["access_token"])
@url = @graphs.get_object("me")
if @url['link'].index("facebook")
if !Fanpage.find_by_uid_and_user(facebook_page["id"],user_id)
@fb = Fanpage.new
@fb.user = user_id
else
@fb = Fanpage.find_by_uid(facebook_page["id"])
end
@fb.name = facebook_page["name"]
@fb.access_token = facebook_page["access_token"]
@fb.uid = facebook_page["id"]
@fb.url = @url['link']
#install or not install
if @graphs.get_object("me/tabs/"+APP_ID.to_s).count > 0
@fb.install = 1
else
@fb.install = 0
end
@fb.save
end
end
end
有没有其他人有类似的问题。如何解决?