Skip to content

Commit

Permalink
Fix to pass in the time expiration since now, when passing info to th…
Browse files Browse the repository at this point in the history
…e plugin for Android. Matches iOS and JS implementation.
  • Loading branch information
Christine Abernathy committed Oct 12, 2012
1 parent 920e030 commit 889fe00
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,13 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
public JSONObject getResponse() {
String response;
if (facebook.isSessionValid()) {
long expiresTimeInterval = facebook.getAccessExpires() - System.currentTimeMillis();
long expiresIn = (expiresTimeInterval > 0) ? expiresTimeInterval : 0;
response = "{"+
"\"status\": \"connected\","+
"\"authResponse\": {"+
"\"accessToken\": \""+facebook.getAccessToken()+"\","+
"\"expiresIn\": \""+facebook.getAccessExpires()+"\","+
"\"expiresIn\": \""+expiresIn+"\","+
"\"session_key\": true,"+
"\"sig\": \"...\","+
"\"userId\": \""+this.userId+"\""+
Expand Down

0 comments on commit 889fe00

Please sign in to comment.