Login with Facebook with my IBM Worklight web application

此生再无相见时 提交于 2019-12-13 04:48:32

问题


I created a simple web application using IBM Worklight. Now, I am trying to use Facebook api using https://developers.facebook.com/docs/guides/mobile/web/#samples tutorial Where a user can login with their Facebook id.

In order to set up this functionality, I need to give the siteUri of my web app so i added web environment to my app and got app URI as http://[Ip Address]:8080/apps/services/www/zShop/mobilewebapp/

But, when I run the application, I get this error

API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.

Not sure what is wrong, please help


回答1:


You'll need to host your app on a human-readable domain (eg. example.com) instead of one reached by a literal IP address. If you don't have a domain, you could try adding an entry in your laptop/desktop's hosts file so you don't have to use the IP address (I haven't tried this with FB apps).

You can also get free webhosting from Heroku. It's free because it's starter-package level hosting. There's a good Heroku tutorial here: https://devcenter.heroku.com/articles/facebook

So ensure you can load the app in a browser using a domain name (eg. example.com).

Then make sure your app settings has this domain name configured:

App Dashboard > Basic > App Domain

Then enter your domain as written in "Step 1" of that tutorial.



来源:https://stackoverflow.com/questions/13079285/login-with-facebook-with-my-ibm-worklight-web-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!