NearByevents code after integrating facebook sdk in my android
public class NearByEvents extends AppCompatActivity {
Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_near_by_events);
button = (Button) findViewById(R.id.button);
listNearByEvents();
}
private void listNearByEvents() {
AccessToken tok;
tok = AccessToken.getCurrentAccessToken();
String id = tok.getUserId();
new GraphRequest(
AccessToken.getCurrentAccessToken(), "/"+id+"/events", null, HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
Log.e("--result", response + "");
}
}
).executeAsync();
}
}
Aucun commentaire:
Enregistrer un commentaire