简体   繁体   English

如何通过iOS应用程序将现有的Facebook帖子分享到用户时间轴?

[英]How to share an existing facebook post to user timeline from an iOS app?

Our app shows some Facebook posts from artists that our users follows. 我们的应用程序显示了一些用户关注的艺术家发布的Facebook帖子。 We want to enable our users to share posts they like back to their timeline (like the share button you see under each post in the Facebook Feed). 我们希望使我们的用户能够将自己喜欢的帖子分享回自己的时间表(例如,您在Facebook Feed中的每个帖子下方看到的分享按钮)。

We tried to do this using the Facebook web dialogs, but we keep running into errors. 我们尝试使用Facebook网络对话框来执行此操作,但是我们一直遇到错误。 For example: When trying to share a post of type photo: If we set a parameter "picture" with the picture url, we get an error that the feed dialog should not use a picture coming form the FBCDN. 例如:尝试共享照片类型的帖子时:如果在图片网址中设置参数“图片”,则会收到错误消息,即提要对话框中不应使用来自FBCDN的图片。

We can share the photo as a link, but than the photo itself doesn't appear on the user timeline. 我们可以将照片共享为链接,但是照片本身不会出现在用户时间轴上。

Is there a way to mimic the functionality of the built in share button? 有没有办法模仿内置共享按钮的功能?

Concerning the "feed dialog should not use a picture coming form the FBCDN" -problem: You might want to fetch the image url (use https://graph.facebook.com/POST_ID to get the post object containing the url) and forward the image data via your own server. 关于“提要对话框不应使用来自FBCDN的图片” -问题:您可能想要获取图像URL(使用https://graph.facebook.com/POST_ID获取包含该URL的发布对象)并转发通过您自己的服务器获取图像数据。 There are ways to hide the original url from the client (read this post ) if Facebook still complains. 如果Facebook仍然抱怨,可以通过一些方法向客户端隐藏原始URL(请阅读这篇文章 )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM