简体   繁体   English

HTML / JavaScript-从我的网站在Facebook墙上发布消息

[英]HTML / JavaScript - Post message on facebook wall from my web

this question may sound stupid, but im getting frustrated from searching around, and i cant manage to do that: 这个问题听起来很愚蠢,但即时通讯让我感到沮丧,我无法做到这一点:

I want to create a button on my web (not an applications if that matters), and when the user will click on it, it will post a dynamic message on his wall. 我想在我的网站上创建一个按钮(如果重要的话,不是应用程序),当用户单击它时,它将在他的墙上发布动态消息。

Do i have to use javascript SDK for it, or is there a simpler way? 我是否必须使用javascript SDK,还是有更简单的方法?

Thanks! 谢谢!

You have to use Facebook Connect (Facebook SDK for Javascript). 您必须使用Facebook Connect(用于Javascript的Facebook SDK)。

Take a look at this: https://developers.facebook.com/docs/javascript/quickstart/v2.2 看看这个: https : //developers.facebook.com/docs/javascript/quickstart/v2.2

But before use this API you need to create an APP ID in the Facebook developers page and use this ID to authenticate through OAuth: 但是在使用此API之前,您需要在Facebook开发人员页面中创建一个APP ID,并使用此ID通过OAuth进行身份验证:

https://developers.facebook.com/apps https://developers.facebook.com/apps

This link also explains you how to use Facebook SDK with jQuery 此链接还向您说明如何将jQuery与Facebook SDK结合使用

https://developers.facebook.com/docs/javascript/howto/jquery https://developers.facebook.com/docs/javascript/howto/jquery

I hope it helps. 希望对您有所帮助。

Edited: 编辑:

If you want something really simple. 如果您想要真正简单的东西。 You can use Social Plugins to allow the user share your website. 您可以使用社交插件允许用户共享您的网站。 But I'm not really sure if you want to post a custom message for the user. 但是我不确定是否要为用户发布自定义消息。

https://developers.facebook.com/docs/plugins/share-button/ https://developers.facebook.com/docs/plugins/share-button/

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

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