/// <summary>
 /// Add pagination cursor
 /// </summary>
 public void AddCursor(SA_FB_Cursor cursor)
 {
     if (cursor != null)
     {
         AddCommand(cursor.Type.ToString(), cursor.Value);
     }
 }
Example #2
0
        /// <summary>
        /// This edge allows you to:
        /// get the User's friends who have installed the app making the query
        /// get the User's total number of friends (including those who have not installed the app making the query)
        /// <para>This edge is only available to Games (including Gameroom), and requires the <b>"user_friends" </b> permission + Canvas app setup
        /// <see cref="https://developers.facebook.com/docs/graph-api/reference/v2.2/user/invitable_friends"/> for information </para>
        /// </summary>
        /// <param name="limit">Result limit </param>
        /// <param name="callback">Request callback </param>
        /// <param name="cursor">Pagination cursor pointer </param>
        public void GetInvitableFriends(int limit, Action <SA_FB_GraphInvitableFriendsListResult> callback, SA_FB_Cursor cursor = null)
        {
            var request = new SA_FB_RequestBuilder("/me?fields=invitable_friends");

            request.AddLimit(limit);
            request.AddCommand("fields", "first_name,id,last_name,name,link,locale,picture");
            request.AddCursor(cursor);


            SA_FB.API(request.RequestString, HttpMethod.GET,
                      (IGraphResult graphResult) =>
            {
                var result = new SA_FB_GraphInvitableFriendsListResult(graphResult);
                callback.Invoke(result);
            });
        }