2011-05-06 42 views
0

如何使用Ajax的Facebook共享页面请求..我想在一个DIV显示其已经来到如何使用AJAX请求Facebook共享页

通常当我点击了Facebook的分享按钮它开结果新窗户。但我不想这样做..我想打开新的div我该怎么办?

+0

我觉得你的运气了这里。 – epascarello 2011-05-06 08:48:35

回答

0

您不能在AJAX中显示DIV。但是,不是弹出,而是可以在iframe中显示它。

检查显示模式:

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

但是:

如果指定的iframe,你必须有 有效的access_token。为了得到一个有效的 的access_token,请参阅 Authentication引导

如果你想避免这个Autentication /事情的access_token,那么你不妨使用page显示模式。这应该看起来像这样:

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 

除了它会显示在你的iframe中。复制该代码块中的所有内容并将其输入到您的地址栏中。

饲料对话框

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