android - ionic app- Given URL is not allowed by the Application configuration -
im developing app ionic , fb graph api.
when debugging , running on browser seems fine, on android device it's not : funtion "fb.getloginstatus(...." won't return, , when debugging adb following error message:
"given url not allowed application configuration: 1 or more of given urls not allowed app's settings. must match website url or canvas url, or domain must subdomain of 1 of app's domains."
if it's configuration issue facebook developers console, i'de appreciate if you'll specific fields should filled)
parts of code: (app.js)
window.fbasyncinit = function() { fb.init({ appid : '1443507049279750', xfbml : true, status : true, cookie : true, version : 'v2.3' }); console.log("ghghghg"); isinit = true; }; (function(d, s, id){ var js, fjs = d.getelementsbytagname(s)[0]; if (d.getelementbyid(id)) {return;} js = d.createelement(s); js.id = id; //js.src = "http//connect.facebook.net/en_us/sdk/debug.js"; js.src = "https://connect.facebook.net/en_us/sdk.js"; fjs.parentnode.insertbefore(js, fjs); }(document, 'script', 'facebook-jssdk')); and inside 1 of controllers :
$scope.fblogin = function() { fb.getloginstatus(function(response) { console.log(response.status); if (response.status === 'connected') { $user.inituser(); $state.go('tab.dash'); } else{ fb.login(function (response){ console.log("hg"); console.log(response); }, {scope: 'email,public_profile,user_friends'}); } }); } thanks !
you need change *info.plist file in platform directory (ios/facebook_login/*info.plist) there need have:
<key>facebookappid</key> <string>your_appid</string> <key>facebookdisplayname</key> <string>your_displayname</string> <key>url types</key> <array> <dict> <key>url schemes</key> <array> <string>fb597296183741619</string> </array> </dict> </array>
Comments
Post a Comment