Facebook.ui method: 'apprequests' hangs only on local development environment but not on anything else - facebook

I used this guide to set up the apprequest dialog. More specifically, I am using sendRequestViaMultiFriendSelector to allow a user to select multiple friends to send the app request to. https://developers.facebook.com/docs/reference/dialogs/requests/
I set this up almost a month ago and it's been working fine on my local development environment. However, today, for whatever reason, it just hangs. I can see requests going to Facebook and all the thumbnails being returned for my friends, but it doesn't seem to get past the 'loading' image.
The other weird thing is that on all my deployment environments (i.e., staging, production), it works just fine.
I checked the Facebook App I use for local development, and I'm not too sure how this happened, but the app id and app secret had changed. I've updated them accordingly but still to no avail.
Any ideas what might be the issue?

I experienced the same issue. The following solved the problem:
Define a custom domain in the hosts file (on the local computer),
as described earlier in this thread.
Configure Visual Studio to use port 80. Don't use a custom
(or random port).
Update the facebook App settings with the custom domain.
If you use a custom port, like 4543, the facebook dialogs will hang.
http://www.lazerwire.com

make sure that your local development server and the production (or any other server you want to run the script from) runs on the same domain (or subdomain of it) as the app domain that you've set in the application setting (in facebook developers site, http://developers.facebook.com/apps )

Another possible workaround is to set display:'popup' in the FB.ui call. The described bug does not occur for this display method.

Related

Have no idea why Facebook login doesn't work

Have no idea why Facebook login doesn't work. Tried all answers to similar questions.The weirdest thing is that there is another app with same settings which works just fine. Maybe there is some kind of update I don't know about.. App runs locally on http://127.0.0.1:8000
Added facebook login product and in value OAuth redirect URLS entered everything possible: localhost, http://127.0.0.1, http://127.0.0.1:8000
Made app public, tried also creating test app. In app domains it's localhost and in Site Urls I tried both localhost and localhost:8000
EDIT: FB init doesn't even work. So no response to debug or something
And anyways I get this error:
Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.
Id and code is correct. The same works on different project(Checked id, all comas and etc). What else could be theoretically wrong? At least does the error mean what it says The domain of this URL isn't included in the app's domains. ?
Same problem here, Just started happening with no warning.
I was using .Net Identity 2.0 with Microsoft.Owin.Security.Facebook 3.0.1 however it seems Facebook may have deprecated support for this.
The only symptom I got when debugging is that the call to AuthenticationManager.GetExternalLoginInfoAsync() returns a null which is extremely not useful.
In the end I upgraded to the release candidate using the NuGet Package Manager Console command "Install-Package Microsoft.Owin.Security.Facebook -Pre"
If you're using .Net with this package then I recommend you test this solution in a staging environment first and see if it fixes the issues (and that it doesn't cause any new issues).
it's the FACEBOOK APP PLATFORM in settings
I had my disabled and kept getting error
I enabled the app platform and it works.
enter image description here

How to test Facebook API actions locally?

I'm building a facebook app and so far so good but when I want to add an action (i.e. an article etc.) which would point to an outside url like "example.com/articles/12" it doesn't work since I'm developing using local urls like "localhost/dev/myprogram/articles/12" and Facebook obviously cannot fetch it.
What's a good way to solve this? Mind that the application doesn't exist on a live domain yet either, so I can't use that space.
I set up the app for the development with my localhost domain and since Facebook uses an iframe it works perfectly, but once I want to actually save objects it fails because of this problem.
so lets say I have an url like:
http://localhost/dev/myprogram/articles/12
then facebook first tries to parse it via
https://graph.facebook.com/?ids=http://localhost/dev/myprogram/articles/12&scrape=true
and then save the new object with something like
https://graph.facebook.com/me/myprogram:upload?article=http://localhost/dev/myprogram/articles/12
This will fail because even though Facebook can reach my localhost trough the iframe, it cant reach this page from anywhere else.
Any workarounds for this?
Thanks
What's a good way to solve this?
Either get some publicly reachable space to test your stuff on (could be a subdomain of your actual project domain, for example) – or set up your local development machine to be reachable from the interwebs, by using a DynDNS service of some sort.

Infinite Reload With Rotating State Param in Facebook Application

Infinite Reload With Rotating State Param in my facebook web app, this problem occur suddenly and suddenly all fb app on my server stop working
Page is refreshing again and again and not able to open ,
script work fine in other serverbut fails to work in this , is there any server config to handle facebook app.
You can chk issue at Link - gomandi.com/visit/
State Token is Refreshing again and again in all website hosted in my server , Looks like some Server confiG. issue is there . Can anyone help me with this.as i am my server support team unable to find this issue why my server fails to connect with fb server or viceversa.
SAME APP WORK IN OTHER SERVER !!
Based upon the comments on the question above, what you need to do is to create a brand new app for the different domain names. So you can have specific URLs for each domain specified in each of the app's app settings. So if there are three domains, then I'd recommend three apps configured correctly to point to each of those three domains.

Custom facebook page tab issue

So, for whatever reason, some people can't see the custom facebook page tab. Not sure why, especially when I can see it just fine.
Link: http://on.fb.me/rKNxUS
Let me know if you need more info.
Do you have a https version of the page tab? If they're account always uses ssl and you don't you might run into issues. Other times I've seen resetting the app secret help with issues like this.
It shows a standard browser error page to me. "This webpage is not available Google Chrome's connection attempt to incontrolwebsites.com was rejected. The website may be down, or your network may not be properly configured."
May it be possible you didn't upload the webpage to the production server?
If it opens correctly from your machine: check that you don't have a custom DNS setting to point to your local webserver instead of the production server.

Facebook local testing: In which direction data is flowing?

This question is not about how to set up local environment to test Facebook application. Rather I've already set this up with the help of this thread. In short I changed my hosts file and its working great.
But, I've a got a doubt:
Assumption: Everywhere I've read that Facebook server works like a proxy and fetches web-pages, like a web service, from application provider's server and then sends this embedded data to browser.
For testing purposes, I've changed my hosts file like mentioned in above thread. My question is if Facebook server is fetching data from my web server then how come my browser gets this data locally after changing hosts file?
It seems either my assumption is wrong or I am missing something fundamental. Please help. Thanks.
Facebook only acts as a proxy server if you are building an FBML app. If you are building an iFrame app, the request to your application is coming directly from the client browser. You can test this out by actually setting your canvas url to something like http://localhost:8080/ and running your app locally. You will be able to run the application like normal, but obviously only you will be able to use it since it is on localhost.