Just wanted to know if there is any way I could develop Facebook applications in localhost.
相关问题
- facebook error invalid key hash for some devices
- LoginActivty with Firebase & Facebook authenticati
- facebook “could not retrieve data from URL”
- setRequestHeader Content-Type causes POST request
- Sharing to Facebook Stories
相关文章
- Facebook login for group members
- The method FB.api will stop working when called fr
- React native deep linking vs Facebook SDK conflct
- UIActivity with no settings for Facebook
- facebook send API Error Code: 100 API Error Descri
- Can't use Facebook Account Kit: Error inflatin
- Facebook API error subcode 33
- Devise + Omniauth: undefined method `user_omniauth
There is ! My solution works when you create an app, but you want to use facebook authentification on your website. This solution below is NOT needed when you want to create an app integrated to FB page.
The thing is that you can't put "localhost" as a domain in the facebook configuration page of your app. Security reasons ?
You need to go to your host file, in OSX / Linux etc/hosts and add the following line : 127.0.0.1 dev.yourdomain.com
The domain you put whatever you want. One mistake is to add this line : localhost dev.yourdomain.com (at least on osx snow leopard in doesnt work).
Then you have to clear your dns cache. On OSX : type dscacheutil -flushcache in the terminal. Finally, go back to the online facebook developer website, and in the configuration page of your app, you can add the domain "dev.yourdomain.com".
If you use a program such as Mamp, Easyphp or whatever, make sure the port for Apache is 80.
This solution should work for Windows because it also has a hosts file. Nevertheless, as far as I remember Windows 7 doesnt use this file anymore, but this trick should work if you find a way to force windows to use a hosts file.
Facebook no longer allowed a 'localhost' callback URL for FBML Facebook applications
With the new development center it is now easier:
1) Leave app domains blank.
2) Click Add Platform
3) Site URL should equal the full path of your local host.
4) Save Changes
Try this:
Its Worked for me...
Suppose that you have registered your app as:
You just need to modify the /etc/hosts file by adding
Then, modify your apache configuration
and restart apache.
You'll need to put your URL in a variable in order to use it as XML parameter on some calls:
app domain : localhost
site URL : http://localhost:4440/
worked for me with the new UI.