Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void GetFriendList() {
- // TODO Auto-generated method stub
- Session activeSession = Session.getActiveSession();
- new Request(
- activeSession,
- "me/taggable_friends",
- null,
- HttpMethod.GET,
- new Request.Callback() {
- public void onCompleted(Response response) {
- try
- { GraphObject go = response.getGraphObject();
- JSONObject jso = go.getInnerJSONObject();
- JSONArray data = jso.getJSONArray("data");
- for ( int i = 0; i < data.length(); i++ )
- {
- JSONObject json_obj = data.getJSONObject( i );
- String name23 = json_obj.getString("name");
- HashMap<String, String> friend = new HashMap<String, String>();
- friend.put(TAG_Friend_Name, name23);
- FriendList.add(friend);
- Log.e("Name response",""+name23);
- name = name23;
- // Toast.makeText(getApplicationContext(), "Name: " + name , Toast.LENGTH_LONG).show();
- }
- }
- catch ( Throwable t )
- {
- t.printStackTrace();
- }
- String name4 = response.toString();
- Log.e("Response ",""+name4);
- /*friend = new ArrayList<String>();
- friend.add(name);*/
- ListAdapter adapter = new SimpleAdapter(Next.this,
- FriendList,
- R.layout.friend_list_item,
- new String[] { TAG_Friend_Name, TAG_ID },
- new int[] { R.id.friendname_textview,
- R.id.friendid_textview });
- friendlist_listview.setAdapter(adapter);
- }
- }
- ).executeAsync();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement