Question

I created the game app using cord-ova/phone-gap,i already built this app and this runs perfectly fine in emulator but when i testing it on real device (now i am using the Samsung android mobile for testing) it shows the error after authenticating the facebook as "the page you requested cannot be displayed at the moment. it may be temporarily unavailable, the link you clicked on may be broken or expired, or you may not have permission to view this page".

That means its getting aunthenticated on facbook but is not able to load intro page. It seems that there is no issue in facebook authentication because after authenticarion it showing the error "the page you requested cannot be displayed at the moment. it may be temporarily unavailable, the link you clicked on may be broken or expired, or you may not have permission to view this page" Is there possibilites that something wrong in facebook application settings in android platform?!

facebook application settings

Package Name: com.everycrave.mypl
Class Name: com.everycrave.mypl.FacebookTestActivity

FacebookTestActivity.java

 public class FacebookTestActivity extends DroidGap {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }
}

is there any problem in hashkey? Intro page is not getting loaded. Please help me out

Was it helpful?

Solution

There might be a error in hash key. For security purpose Facebook requires the hash key for your android application if you are dealing with Facebook like Facebook authentication or other reason. It is possible that while exporting you are using debug.key-store for generating the hash key. But its not allowed to use the hash key generated debug.key-store. So while exporting generate a new key-store and use that key-store to hash key. Keep that key-store safe because for later release version you need the same key-store to generate the hash key. For generating hash key use following tool command.

keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%.android\debug.keystore | openssl sha1 -binary | openssl base64

give the path to your newly generated key-store. And do not use debug.keystore.

And for more details Refere the page https://developers.facebook.com/docs/android/getting-started/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top