为什么 facebook.feed.publishUserAction 会删除我的图像?

发布于 2024-07-24 10:00:31 字数 670 浏览 2 评论 0原文

我正在 Rails 中使用 Facebooker 插件将用户操作发布到他们的新闻源,但未添加图像。

该调用(通过 Net::HTTP.post_form)如下所示:

Posting to http://api.facebook.com/restserver.php with
{:api_key=>"4f5ed28f76142adsfasdf029c98ad", :template_bundle_id=>"107345673712", 
:template_data=>"{\"project\": \"testing\", \"images\": 
[{\"src\":\"http://www.dezyne.net/news.jpg\", 
\"href\":\"http://www.facebook.com/\"}]}", 
:session_key=>"2.nvhdfsdfgimDZWSwQ__.86400.1245405600-100000007614297", 
:method=>"facebook.feed.publishUserAction", :sig=>"ac0a7181b351b5fdgsdfge767a004314", 
:call_id=>"1242343866.44512", :v=>"1.0"}

“Project”在发布到新闻源的文本中正常捕获。

I'm using the Facebooker plugin in Rails to publish a user action to their newsfeed, but the image isn't being added.

The call (via Net::HTTP.post_form) looks like this:

Posting to http://api.facebook.com/restserver.php with
{:api_key=>"4f5ed28f76142adsfasdf029c98ad", :template_bundle_id=>"107345673712", 
:template_data=>"{\"project\": \"testing\", \"images\": 
[{\"src\":\"http://www.dezyne.net/news.jpg\", 
\"href\":\"http://www.facebook.com/\"}]}", 
:session_key=>"2.nvhdfsdfgimDZWSwQ__.86400.1245405600-100000007614297", 
:method=>"facebook.feed.publishUserAction", :sig=>"ac0a7181b351b5fdgsdfge767a004314", 
:call_id=>"1242343866.44512", :v=>"1.0"}

'Project' is captured OK in the text that's posted to the newsfeed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嗳卜坏 2024-07-31 10:00:31

一个可能的问题是您在实际上传图像之前测试了此模板。 这将导致 Facebook 缓存一张空图像。 每次请求图像时,FB 都会使用其存储的缓存,而不是重新检索图像。

如果这是问题所在,解决方案是使用 API 函数 fbml.refreshImgSrc() 来使 Facebook 更新其缓存。 不幸的是,没有快速机制可以执行此操作,因为该 API 方法在测试控制台中或通过开发人员应用程序根本不可用,这意味着您需要编写一个脚本来刷新该图像的缓存。

如果这没有帮助,请回帖,我会看看是否想不出任何其他可能的问题。

One possible issue is that you tested this template before actually uploading the image. This would cause Facebook to have cached an empty image. Every time the image is requested, FB uses their stored cache rather than retrieving the image all over again.

If this is the problem, the solution is to use the API function fbml.refreshImgSrc() to cause Facebook to update their cache. Unfortunately there's no quick mechanism to do this as that API method is not available in the Test Console nor through the Developer app at all, meaning you will need to write a script just to refresh the cache of this image.

If this doesn't help, post back and I'll see if I can't think of any other possible problems.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文