Example #1
0
        private IList <custom_tag> GetCustomTags(string aid, bool isAsync, GetCustomTagsCallback callback, Object state)
        {
            var parameterList = new Dictionary <string, string> {
                { "method", "facebook.fbml.getCustomTags" }
            };

            Utilities.AddOptionalParameter(parameterList, "app_id", aid);

            if (isAsync)
            {
                SendRequestAsync <fbml_getCustomTags_response, IList <custom_tag> >(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted <IList <custom_tag> >(callback), state, "custom_tag");
                return(null);
            }

            var response = SendRequest <fbml_getCustomTags_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey));

            return(response == null ? null : response.custom_tag);
        }
Example #2
0
 /// <summary>
 /// Returns the custom tag definitions for tags that were previously defined using fbml.registerCustomTags.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new FBMLCanvasSession(Constants.WebApplicationKey, Constants.WebSecret));
 ///     api.Session.UserId = Constants.UserId;
 ///     api.Fbml.GetCustomTagsAsync(Constants.OtherApplicationId, AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(IList&lt;custom_tag&gt; result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="app_id">The ID of the application whose custom tags you want to get. If the ID is the calling application's ID, all the application's custom tags are returned. Otherwise, only the application's public custom tags are returned</param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>
 /// <returns>This method returns the custom tag definitions for previously defined tags.</returns>
 public void GetCustomTagsAsync(string app_id, GetCustomTagsCallback callback, Object state)
 {
     GetCustomTags(app_id, true, callback, state);
 }
Example #3
0
 /// <summary>
 /// Returns the custom tag definitions for tags that were previously defined using fbml.registerCustomTags.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new FBMLCanvasSession(Constants.WebApplicationKey, Constants.WebSecret));
 ///     api.Session.UserId = Constants.UserId;
 ///     api.Fbml.GetCustomTagsAsync(AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(IList&lt;custom_tag&gt; result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>
 /// <returns>This method returns the custom tag definitions for previously defined tags.</returns>
 public void GetCustomTagsAsync(GetCustomTagsCallback callback, Object state)
 {
     GetCustomTagsAsync(null, callback, state);
 }
        private IList<custom_tag> GetCustomTags(string aid, bool isAsync, GetCustomTagsCallback callback, Object state)
        {
            var parameterList = new Dictionary<string, string> { { "method", "facebook.fbml.getCustomTags" } };
            Utilities.AddOptionalParameter(parameterList, "app_id", aid);

            if (isAsync)
            {
                SendRequestAsync<fbml_getCustomTags_response, IList<custom_tag>>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted<IList<custom_tag>>(callback), state, "custom_tag");
                return null;
            }

            var response = SendRequest<fbml_getCustomTags_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey));
            return response == null ? null : response.custom_tag;
        }
 /// <summary>
 /// Returns the custom tag definitions for tags that were previously defined using fbml.registerCustomTags.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new FBMLCanvasSession(Constants.WebApplicationKey, Constants.WebSecret));
 ///     api.Session.UserId = Constants.UserId;
 ///     api.Fbml.GetCustomTagsAsync(Constants.OtherApplicationId, AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(IList&lt;custom_tag&gt; result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="app_id">The ID of the application whose custom tags you want to get. If the ID is the calling application's ID, all the application's custom tags are returned. Otherwise, only the application's public custom tags are returned</param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 /// <returns>This method returns the custom tag definitions for previously defined tags.</returns>
 public void GetCustomTagsAsync(string app_id, GetCustomTagsCallback callback, Object state)
 {
     GetCustomTags(app_id, true, callback, state);
 }
 /// <summary>
 /// Returns the custom tag definitions for tags that were previously defined using fbml.registerCustomTags.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new FBMLCanvasSession(Constants.WebApplicationKey, Constants.WebSecret));
 ///     api.Session.UserId = Constants.UserId;
 ///     api.Fbml.GetCustomTagsAsync(AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(IList&lt;custom_tag&gt; result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 /// <returns>This method returns the custom tag definitions for previously defined tags.</returns>
 public void GetCustomTagsAsync(GetCustomTagsCallback callback, Object state)
 {
     GetCustomTagsAsync(null, callback, state);
 }