当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - How To request with ajax the facebook share page

问题描述:

How to request with ajax the facebook share page.. and I want to show in a DIV The result which is come

Normally When I clicked the facebook share button It opening new window. But I dont want to do this.. I want open new div How can I do?

网友答案:

You cannot AJAX and show in a DIV. However instead of pop-up, you can show it in an iframe.

Check the Display modes:

http://developers.facebook.com/docs/reference/dialogs/

However:

If you specify iframe, you must have a valid access_token. To get a valid access_token, please see the Authentication guide

If you'd like to avoid this Autentication / access_token thing, then you might as well use the page display mode. Which should look something like this:

http://www.facebook.com/dialog/feed?
  app_id=123050457758183&
  link=http://developers.facebook.com/docs/reference/dialogs/&
  picture=http://fbrell.com/f8.jpg&
  name=Facebook%20Dialogs&
  caption=Reference%20Documentation&
 description=Dialogs%20provide%20a%20simple,%20consistent%20interface%20for%20applications%20to%20interact%20with%20users.&
  message=Facebook%20Dialogs%20are%20so%20easy!&
  redirect_uri=http://www.example.com/response

Except it will show inside your iframe. Copy everything in that code block and enter it in your adress bar.

Feed Dialogs

http://developers.facebook.com/docs/reference/dialogs/feed/

分享给朋友:
您可能感兴趣的文章:
随机阅读: