Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook SDK asking for permissions again and again like running in a loop in android
    primarykey
    data
    text
    <p>I am using Facebook SDK(latest version) in my app. I just want to take general data from the logged in user like name, date of birth, location, gender etc. and just want to fill the details accordingly. But the problem is that its showing the permission dialog again and again infinitely even I press Ok or Cancel for the app permission dialog its doing the same showing that permission dialog again and again. I cant understand whats wrong with this.</p> <p>my login function is like this :-</p> <pre><code> Session.openActiveSession(context, true, new Session.StatusCallback() { @Override public void call(final Session session, SessionState state, Exception exception) { // TODO Auto-generated method stub if(session.isOpened()) { Toast.makeText(context, "Please Wait", 1).show(); List&lt;String&gt; permissions = session.getPermissions(); if (!isSubsetOf(PERMISSIONS, permissions)) { pendingPublishReauthorization = true; Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest(context, PERMISSIONS); session.requestNewPublishPermissions(newPermissionsRequest); } Request.executeMeRequestAsync(session, new Request.GraphUserCallback() { @Override public void onCompleted(GraphUser user, Response response) { // TODO Auto-generated method stub if(user!=null) { try{ Log.d("", "Fb responcse == "+response.toString()); Log.d("", "FbUser &gt;&gt; "+ user.toString()); fbUserid=user.getId(); fbAccessToken=session.getAccessToken(); Log.i("User Name ", "FbName : "+user.getName()); Log.i("User Id ", "FbId : "+user.getId()); Log.i("User Id ", "FbLocation : "+user.getLocation().toString()); Log.i("User Id ", "FbEmailId : "+user.getLink()); Log.i("User Id ", "FbDob : "+user.getBirthday()); Log.i("User Id ", "FbGender : "+user.asMap().get("gender").toString()); Log.i("User Id ", "FbEmail : "+user.getProperty("email").toString()); //Log.i("User Id ", "FbCity : "+user.getLocation().getCity().toString()); //Log.i("User Id ", "FbState : "+user.getLocation().getState().toString()); Log.i("User Access Token ", "FbAccess Token : "+session.getAccessToken()); pBar.setVisibility(View.INVISIBLE); String name = user.getName(); String dob = user.getBirthday(); String gender = user.asMap().get("gender").toString(); String email =user.getProperty("email").toString(); String city = user.getLocation().getProperty("name").toString(); String url="http://graph.facebook.com/"+user.getId()+"/picture?type=large"; setText(name, dob, email, city, "","",url); }catch(Exception ex){ ex.printStackTrace(); } } else{ pBar.setVisibility(View.INVISIBLE); Log.i("ELSE", "ELSE"); } } }); } } }); </code></pre> <p>Also I am using permission to get these details using this code snippet :-</p> <pre><code>List&lt;String&gt; PERMISSIONS = Arrays.asList("publish_actions","email","user_birthday","user_location"); </code></pre> <p>Please help me to sort out this, as it is again and again showing me the permission dialog only.</p> <p>Any help would be appreciable thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload