How to solve facebook login plugin configurator error? - facebook

I am using Facebook Login Pluginator(https://developers.facebook.com/docs/facebook-login/web/login-button#plugin-configurator). On click of that button it will open popup itself(As pop up is opening after click event so browser will not block popup).There is error message for developer like below.
"You are using a display type of 'popup' in a large browser window or tab. For a better user experience, show this dialog with our JavaScript SDK without specifying an explicit display type. The SDK will choose the best display type for each environment. Alternatively, set height and width on your window.open() call to properly size this dialog if you have special requirements precluding you from using the SDK. This message is only visible to developers of your application."
How can i fix that?
I am using v5.0 facebook js sdk.

Related

Facebook messenger checkbox plugin is hidden (already checked other answers)

I have the same problem like asked here: Facebook messenger checkbox plugin is hidden
I tried the implementation of the Facebook Checkbox Plugin according to Facebooks documentation but it won't show on my VM in my Company.
The Facebook SDK Implementation works fine, I tried the "Share" and "Like"-Button, which show up correct.
I have a Facbook Page which has public access and a Messenger APP in DEV-mode. The "Send-API" from Facebook works correct too: I am able to send message to myself as administrator from my Webpage on my development VM.
Following Steps are done: use a random user_ref on every request, set my page on the whitelist, use "https", visit my page FB-loggedIN and FB-loggedOut
But the result ends in Markup and Log-Infos like this screen:
See FF DeveloperTools Markup Screenshot for current state
According to this I visited a page given as origin where the Plugin should work (see first link in my question) - but there the plugins' HTML is the same like mine.
So is there a general problem on Facebooks' site or is there quite more necessary, to get this plugin running? Could it be a problem with self-signed certificate on my VM?
At the moment I don't want to notify or login any user. All I want is that the checkbox is shown.
Pherhaps anyone has an idea or the same experiences :)
Additional Info: the console shows following message
fb:messenger_checkbox failed to resize in 45s
after some fiddling we found out that a registered webhook is required (even if you dont consume the events) to make the messenger checkbox plugin render properly.

How do I show a popup in my Crossrider browser plugin

How can I show a popup programmatically in my Crossrider.com browser plugin? It works fine to click the button and show it, but I want it to show automatically on certain pages. I do not see any api method available like appAPI.browserAction.showPopup(), which would be ideal. I also do not see how to trigger the button click event. TIA.
First of all, I would recommend you to familiarizing yourself with How to add a browser button to your Crossrider extension in general and the button popup feature specifically.
Now, as for triggering the browser button "window open" right from the code - this is not supported through the API as it bad for user experience and in any case not supported in Chrome, so building such support only for Internet Explorer and Firefox seems futile.

Method FB.ui loads forever when called on Firefox and Internet Explorer

I have problem in a script that was working until 3 or 4 days ago.
I'm using this (simplified version) code to send an app request to a user and it was working until few days ago, now it seems that something in facebook has changed and the window (wich is opened in iframe automatically) loads forever in Firefox and Internet Explorer. It continues to work normaly.
I Know that I can force the parameter display: 'popup', but sending the request after some other javascript lines it means that firefox blocks the popup opening and so it is useless for me.
function Test()
{
FB.ui({method: 'apprequests', message: 'My Great Request' }, CallbackFunction);
}
function CallbackFunction(response)
{
alert(JSON.stringify(response));
}
The page has no style and it's clean, here the full code: http://pastebin.com/QqbRceJ2
This is what it happens: http://i59.tinypic.com/10hq6w5.png
Any help is apreciated, I'm stuck on this since monday...
As Slav said it's a confirmed Facebook SDK bug that's related to iframe:
It appears this issue is occurring when you provide the
display:"iframe" parameter to the feed dialog. If that is removed the
dialog should be displayed correctly as a temp fix while this is
investigated .
Although you're not passing the display=iframe parameter, the default behavior of the FB.ui is a modal iframe:
The display parameter: determines how the dialog is rendered. If you are using the URL
redirect dialog implementation, then this will be a full page display,
shown within 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. If you are using the JavaScript SDK, 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. You can also force the popup or page types when using the
JavaScript SDK, if necessary. Mobile web apps will always default to
the touch display type.
Try changing your function Test() to this:
function Test(){
FB.ui({display: 'popup', method: 'apprequests', message: 'My Great Request' }, CallbackFunction);
}
I guess the correct answer is that is is FB SDK bug as confirmed here
https://developers.facebook.com/x/bugs/733458870047972/

Add Page Tab Dialog, a ReferenceError is raised on Facebook code - "ua is not defined"

I am launching the Add Page Tab Dialog using the FB.ui method of the Javascript API:
FB.ui({method: 'pagetab'},function(response){
// code that records the page(s) selected removed
});
If I don't have the console open in my browser, the dialog pops up, but the progress icon spins indefinitely. If I do have the console open, I see that a ReferenceError exception is being thrown with the message "ua is not defined." ua appears to be an instance of an object that should be part of Facebook's pagetab code. The enclosing functions are also marked with _DEPRECATED, which is a bit worrisome.
This code has worked fine up until yesterday, but I don't see anything in the Facebook Developer blog about changes that could impact the Add Page Tab Dialog.
The error: (click for larger, more readable version)
User-facing behavior:
Update: this is now a known Facebook bug.
This was a bug in the Facebook API. They pushed out a fix today which returns the Add Page Tab dialog to operational status.

Facebook SDK install APP with install confirmation

I am looking for help to validate when a Facebook APP has been installed. I am currently using PHP SDK to have the clients sign in and in the same manor I would like for them to return to the site once the APP is completed and installed correctly.
Is there a method to use this link and have it return with the client id?
https://www.facebook.com/add.php?api_key=XXX
You should not use https://www.facebook.com/add.php?api_key=XXX for any cases other addition of application to page as a tab (and even this is undocumented).
If you're using PHP-SDK you should use Facebook::getLoginUrl to log user in, which support redirect_uri parameter so you can add client id as argument to this URL
Update:.
As it turns question is about adding application tab to page you should be using Add Page Tab Dialog to provide user with a way of "installing" application to page without leaving your app.
You can refer to answers on How to add tab application to a page with the "new auth dialog" for more info.
Update 2:
How to reach applications running as Page Tab described in "Integration with Facebook APIs" section of Page Tab Tutorial:
your application will also receive a string parameter called app_data as part of signed_request if an app_data parameter was set in the original query string in the URL your tab is loaded on. For the Shop Now link above, that could look like this: http://www.facebook.com/YourPage?v=app_1234567890&app_data=any_string_here. You can use that to customize the content you render if you control the generation of the link.
You not required to add app_data, just use v=app_APPID to link to your page tabs (Facebook itself using sk instead of v, both works).