将嵌入的 HTML 和 JavaScript 发布到 Facebook
我知道如何将消息等发布到 Facebook 墙,但我想发布自定义 HTML 和 JavaScript Facebook 墙,并且我希望显示 HTML/JavaScript 代码,以便用户可以在 Facebook 上使用该代码而无需离开 Facebook,例如嵌入的 YouTube 视频 我已经看到这是可能的...
我用它来发布到 Facebook:
FacebookWebClient client = new FacebookWebClient();
// Post to user's wall
var postparameters = new Dictionary<string, object>();
postparameters["message"] = "Hello world!";
postparameters["name"] = "This is a name";
postparameters["link"] = "http://thisisalink.com;
postparameters["description"] = "This is a description";
var result = client.Post("/me/feed", postparameters);
我该怎么做?
也许类似
postparameters["html"] = "html or view";
I know how to post a message, etc. to a Facebook wall, but I want to post a custom HTML and JavaScript Facebook wall, and I want that HTML/JavaScript code to appear so users can use that from Facebook without leaving Facebook, like embedded YouTube videos I have seen this to be possible...
I use this to post to Facebook:
FacebookWebClient client = new FacebookWebClient();
// Post to user's wall
var postparameters = new Dictionary<string, object>();
postparameters["message"] = "Hello world!";
postparameters["name"] = "This is a name";
postparameters["link"] = "http://thisisalink.com;
postparameters["description"] = "This is a description";
var result = client.Post("/me/feed", postparameters);
How do I do this?
Maybe something like
postparameters["html"] = "html or view";
If it is not possible, how do I post SWF content with Flash parameters?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于安全问题,无法将自定义 HTML 或 JavaScript 代码发布到 Facebook 帖子中。
但是,如果您想在“点赞、评论”旁边添加操作链接,您仍然可以自定义很多内容,例如链接和图像。
在 核心概念 › Graph API › Post< 中查找有关发布帖子的更多信息/a>。
There is no way to post custom HTML or JavaScript code into a Facebook post because of security issues.
But you can still customize a lot of stuff like the link and the image, if you want to add an action link next to "Like, comment".
Find a lot more about publishing a post in Core Concepts › Graph API › Post.
要发布 SWF 视频,您需要做一些工作。
首先,创建一个 SWF 视频所在的页面,您可以在其中指定 Open Graph 元标记。读
更多信息请参见开放图谱协议。
然后,您需要创建一个帖子,其中包含指向该页面的链接,并带有 Open Graph 标签。然后使用post对象的“link”参数指向SWF文件。
To post an SWF video, you will need to do some work.
First, create a page that the SWF videos lives on where you can specify Open Graph meta tags. Read
more in The Open Graph protocol.
Then you need to create a post with a link to that page with the Open Graph tags. Then use the "link" parameter of the post object to point to the SWF file.