Im having an Issue when i try to sign up with face book get the following in the log cat
07-11 10:15:07.757: W/com.facebook.Session(8910): Should not pass a read permission (user_likes) to a request for publish or manage authorization
07-11 10:15:07.772: W/com.facebook.Session(8910): Should not pass a read permission (email) to a request for publish or manage authorization
07-11 10:15:07.777: W/com.facebook.Session(8910): Should not pass a read permission (user_birthday) to a request for publish or manage authorization
07-11 10:15:07.787: W/com.facebook.Session(8910): Should not pass a read permission (user_location) to a request for publish or manage authorization
07-11 10:15:08.797: V/log_tag(8910): Token=
07-11 10:15:08.797: V/log_tag(8910): Token=false
I followed the proper documentation of facebook even Used the code to generate the SHA key and placed it on console disable sand box enable face book login disable deep linking but still no luck Code that i used for face book is following
facebookBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Session.openActiveSession(SignIn_Rewards.this, true, new Session.StatusCallback() {
// callback when session changes state
@Override
public void call(Session session, SessionState state,
Exception exception) {
Log.v("log_tag", "Token=" + session.getAccessToken());
Log.v("log_tag", "Token=" + session.isOpened());
Session currentSession = Session.getActiveSession();
if (currentSession == null || currentSession.getState().isClosed())
{
session = new Session.Builder(SignIn_Rewards.this).build();
Session.setActiveSession(session);
currentSession = session;
}
else if(!currentSession.isOpened())
{
//Ask for username and password
OpenRequest op = new Session.OpenRequest(SignIn_Rewards.this);
op.setLoginBehavior(SessionLoginBehavior.SSO_WITH_FALLBACK);
op.setCallback(null);
List<String> permissions = new ArrayList<String>();
permissions.add("publish_stream");
permissions.add("user_likes");
permissions.add("email");
permissions.add("user_birthday");
permissions.add("user_location");
op.setPermissions(permissions);
session = new Session.Builder(SignIn_Rewards.this).build();
Session.setActiveSession(session);
session.openForPublish(op);
}
else if (session.isOpened()) {
// make request to the /me API
Request.executeMeRequestAsync(session,
new Request.GraphUserCallback() {
// callback after Graph API response with user
// object
@Override
public void onCompleted(GraphUser user,
Response response) {
if (user != null) {
/* TextView welcome = (TextView) findViewById(R.id.welcome);
welcome.setText("Hello "
+ user.getName() + "!");*/
finish();
Log.d("User Name",""+user.getName()+" "+user.getFirstName()+" "+user.getLastName()+" "+user.getProperty("email")+user.getBirthday()+user.getLocation().getProperty("name"));
}
}
});
}
}
});
}
}) ;
please correct me where I am wrong