public void InsertFacebookFriend( AsFaceBookFriend listData) { UIListItem item = m_list.CreateItem( m_objChoiceItem) as UIListItem; AsFacebookItem baseFriendItem = item.gameObject.GetComponent<AsFacebookItem>(); if( null == baseFriendItem) return; baseFriendItem.SetFacebookFriendData( listData); }
public void SetFacebookFriendData( AsFaceBookFriend friend) { m_friendData = friend; desc.Text = friend.name; StringBuilder sb = new StringBuilder(); sb.AppendFormat( "https://graph.facebook.com/{0}/picture", m_friendData.str_id); if( friend.installed) m_InviteMsgBtn.gameObject.SetActiveRecursively( false); else m_InviteMsgBtn.gameObject.SetActiveRecursively( true); StartCoroutine( LoadPortraitImage( sb.ToString())); }
public AsFaceBookFriend[] GetFaceBookFriendByPage( int page) { int index = 0; int pageIndex = page * FACEBOOKFRIEND_LIST_PER_PAGE; int id = 0; AsFaceBookFriend[] arrayFaceBook = new AsFaceBookFriend[FACEBOOKFRIEND_LIST_PER_PAGE]; foreach( KeyValuePair<UInt64, AsFaceBookFriend> pair in m_FacebookFrinedList) { //Start if( index >= pageIndex && index < pageIndex + FACEBOOKFRIEND_LIST_PER_PAGE) { arrayFaceBook[id] = pair.Value; ++id; } ++index; if( index > pageIndex + FACEBOOKFRIEND_LIST_PER_PAGE) break; } return arrayFaceBook; }
public void FaceBookFriendInsert( string name, string id, string installed = null) { Debug.Log( "data name: " + name + "id: " + id +"installed: "+ installed); UInt64 convert_id = 0; if( UInt64.TryParse( id , out convert_id) != true) return; if( m_FacebookFrinedList.ContainsKey( convert_id) != true) { AsFaceBookFriend facebookfriend = new AsFaceBookFriend(); facebookfriend.id = convert_id; facebookfriend.name = name; facebookfriend.str_id = id; if( null != installed) facebookfriend.installed = true; m_FacebookFrinedList.Add( convert_id, facebookfriend); } }