Facebook墙贴错误:OAuthException ::(#1500)您提供的URL无效 [英] Facebook wall post error: OAuthException :: (#1500) The url you supplied is invalid
问题描述
fb_graph
将评论转发到用户的Facebook墙。一切都工作完美,直到几个星期前。没有理由我可以解释我现在看到一些令人困惑的行为。 现在,当用户向故事提交评论时,FB API会响应, OAuthException ::(#1500)您提供的URL是无效
。如果,同一个用户然后向相同的故事提交额外的评论,这些评论将发布到用户的FB Feed。
我已经使用FB Graph API资源管理器来确认我有适当的访问令牌,并且我的应用程序确实接受了令牌所有者的FB Feed的帖子。
为了使事情更加令人困惑,当运行我的网络应用程序在本地主机上开发所有的帖子都通过我的开发FB应用程序。
def post_to_facebook(story,post)
auth = Authentication.find_by_provider_and_user_id(facebook,current_user.id)
如果auth
me = FbGraph :: User.me(auth.token)
if me.permissions.include? (:publish_stream)
begin
me.feed!(
:message =>#{best_name(current_user)}将以下帖子发布到NewsWick:#{post.contents},
:name => story.title,
:link =>https://www.newswick.com/stories/\"+story.id.to_s,
:description => StoryWick全球新闻服务的故事,
:picture => best_photo(story)[:photo_url]
)
rescue => e
@msg =Facebook发布错误:+ e.to_s
放置Facebook feed发布错误:#{e.message}
end
else
@msg =不再授权发布到Facebook。
end
end
return @msg
end
7月份的突破性改变。
任何人都有任何线索。这是驱使我笨蛋!!!
我有同样的问题只有区别是我使用的是javascript api 。
似乎是一个Facebook错误,已经在这里报告: https://developers.facebook.com/bugs/136768399829531
I have a web-based news app that runs on Heroku. When users post a comment to a news story on my app, my app forwards the comment to the user's facebook wall using fb_graph
. Everything worked perfectly until a couple of weeks ago. For no reason that I can explain I am now seeing some baffling behavior.
Now, when a user submits a comment to a story the FB API responds with, OAuthException :: (#1500) The url you supplied is invalid
. If, the same user then submits additional comments to the same story those comments are posted to the user's FB feed just fine.
I have used the FB Graph API explorer to confirm that I have valid access tokens, and that my app does accept posts to the token-owner's FB feed.
To make things even more baffling, when running my web app in development on localhost all of the posts go through just fine to my development FB app.
def post_to_facebook(story, post)
auth = Authentication.find_by_provider_and_user_id("facebook", current_user.id)
if auth
me = FbGraph::User.me(auth.token)
if me.permissions.include?(:publish_stream)
begin
me.feed!(
:message => "#{best_name(current_user)} made the following post to NewsWick: #{post.contents}",
:name => story.title,
:link => "https://www.newswick.com/stories/"+story.id.to_s,
:description => "Story posted to the NewsWick world-wide news service" ,
:picture => best_photo(story)[:photo_url]
)
rescue => e
@msg = "Facebook posting error: "+ e.to_s
puts "Facebook feed posting error: #{e.message}"
end
else
@msg = "No longer authorized to post to Facebook."
end
end
return @msg
end
One last thing to note, the only thing that I have changed w/r/t how my app interacts with FB in the last two weeks was that i accepted FB's July Breaking Changes
.
Anyone have any clues. This is driving me bonkers!!!
I'm having the same issue only difference is I'm using the javascript api.
Seems like it's a facebook bug, which is already reported here: https://developers.facebook.com/bugs/136768399829531
这篇关于Facebook墙贴错误:OAuthException ::(#1500)您提供的URL无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!