简体   繁体   English

Facebook feed对话框弹出

[英]facebook feed dialog to be popup

I am using below link to share my ruby on rails website content on facebook, I need this link to be popup , i am using display=popup as documents says, but it doesnot popsups. 我正在使用下面的链接在Facebook上共享我的ruby on rails网站内容,我需要此链接才能弹出,我正在使用display=popup如文档所述,但不会弹出。

href="http://www.facebook.com/dialog/feed?app_id=xxxx&display=popup&redirect_uri=http://www.xy.com&name="some_text"&link=http://www.xy.com/&picture="logored.jpg"+&properties=&actions="

what else I can try for displaying the link as popup? 还有什么我可以尝试将链接显示为弹出窗口?

According to this Facebook DEV page, you should use Facebook SDK for JavaScript in order to use modal iframe on webpage. 根据此Facebook DEV页面,您应该使用Facebook SDK for JavaScript才能在网页上使用模式iframe。

I've recently checked and you should read too; 我最近检查过,您也应该阅读;

from: https://developers.facebook.com/docs/sharing/reference/share-dialog 来自: https : //developers.facebook.com/docs/sharing/reference/share-dialog

If you are using the URL redirect dialog implementation, then this will be a full page display, shown within Facebook.com. 如果您使用的是URL重定向对话框实现,那么这将是整页显示,显示在Facebook.com中。 This display type is called page. 这种显示类型称为页面。

If you are using one of our iOS or Android SDKs to invoke the dialog, this is automatically specified and chooses an appropriate display type for the device. 如果您使用我们的iOS或Android SDK之一来调用对话框,则会自动指定该对话框并为设备选择适当的显示类型。

If you are using the Facebook SDK for JavaScript, this will default to a modal iframe type for people logged into your app or async when using within a game on Facebook.com, and a popup window for everyone else. 如果您使用用于JavaScript的Facebook SDK,则在Facebook.com上的游戏中使用时,对于登录到您的应用程序的用户或异步用户,这将默认为模式iframe类型,对于其他所有人将使用弹出窗口。 You can also force the popup or page types when using the Facebook SDK for JavaScript, if necessary. 如果需要,还可以在使用JavaScript的Facebook SDK时强制弹出或页面类型。

Mobile web apps will always default to the touch display type 移动网络应用将始终默认为触摸显示类型

In order to do that, add Javascript SDK to your views/layouts/application.html.erb file just after body tag. 为此,只需在body标签之后将Javascript SDK添加到您的views / layouts / application.html.erb文件中即可。 Then use sth like this where you want to place your dialog: 然后使用sth这样的方式放置对话框:

FB.ui({
  method: 'share',
  href: 'https://developers.facebook.com/docs/',
}, function(response){});

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

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