创建类似facebook之类的按钮 [英] Creating something like a facebook like button

查看:79
本文介绍了创建类似facebook之类的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道Facebook之类的按钮(共享,推荐等),google plus,twitter(推特按钮)等如何工作?

就像如果我有自己的社交网络网站允许类似功能的情况一样,可以说它是一个微博客,当您单击socialnetworkexample.com按钮上的帖子(在第三方网站上)时,它会执行该操作,但风格与其他所有社交网络按钮(计数器,小网站图标,oauth).

我知道他们使用iframe.但是,执行此操作的确切方法是什么(创建一个包含将当前网站发布到社交网络的按钮的iframe)?我只是停留在iframe部件上,因为从未与他们合作.那里有什么例子吗?

很抱歉您对这个主题不了解.

I would like to know how does a facebook like button (share, recommend, etc), google plus, twitter (tweet button), etc. all work?

Like what if I had my own social network website that allowed a similar function, lets say its a microblog and when you click on the post on socialnetworkexample.com button (on the third party website) it does that action but with the same style as all the other social network button(count meter, small website icon, oauth).

I know they use an iframe. But what would be the exact way of doing this (creating an iframe that contains the button to post the current site to the social network)? Im just stuck with the iframe part because never work with them. Are there any examples out there?

Sorry for being so noob with the subject.

推荐答案

iframe实际上是浏览器中的浏览器.您可以在其中放置一个新页面,就好像它是另一个窗口一样.它会显示一个按钮,并通过调用服务器来响应它,以完成您想要的所有事情.我想如果不是在facebook上,而是在其他地方,它会发回到一个类似于您提供的HTML中标识的特定内容的URL.
An iframe is really a browser in a browser. You can put a whole new page in there, it renders as if it was a different window. It will show a button, and respond to it with calls to the server, to do all the things you want. I guess if it''s not IN facebook, but elsewhere, it''s posting back to a URL that likes the specific thing identified in the HTML you provide.


这篇关于创建类似facebook之类的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆