• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FacebookDelegate类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FacebookDelegate的典型用法代码示例。如果您正苦于以下问题:C# FacebookDelegate类的具体用法?C# FacebookDelegate怎么用?C# FacebookDelegate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FacebookDelegate类属于命名空间,在下文中一共展示了FacebookDelegate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Post

 internal static void Post(
     string url,
     Dictionary<string, string> formData = null,
     FacebookDelegate<IGraphResult> callback = null)
 {
     Request(url, HttpMethod.POST, formData, callback);
 }
开发者ID:roccolangeweg,项目名称:LumniBenderOfTime,代码行数:7,代码来源:AsyncRequestString.cs


示例2: API

 public static void API(
     string endpoint,
     HttpMethod method,
     FacebookDelegate callback)
 {
     if (method != HttpMethod.GET) throw new NotImplementedException();
     Task.Run(async () =>
     {
         FacebookClient fb = new FacebookClient(_fbSessionClient.CurrentAccessTokenData.AccessToken);
         FBResult fbResult = null;
         try
         {
             var apiCall = await fb.GetTaskAsync(endpoint, null);
             if (apiCall != null)
             {
                 fbResult = new FBResult();
                 fbResult.Text = apiCall.ToString();
                 fbResult.Json = apiCall as JsonObject;
             }
         }
         catch (Exception ex)
         {
             fbResult = new FBResult();
             fbResult.Error = ex.Message;
         }
         if (callback != null)
         {
             Utils.RunOnUnityAppThread(() => { callback(fbResult); });
         }
     });
 }
开发者ID:JeffreyKimani,项目名称:unityplugins,代码行数:31,代码来源:FB.cs


示例3: Get

 internal static void Get(
     string url,
     Dictionary<string, string> formData = null,
     FacebookDelegate callback = null)
 {
     Request(url, HttpMethod.GET, formData, callback);
 }
开发者ID:schoolsout,项目名称:Schools-Out,代码行数:7,代码来源:AsyncRequestString.cs


示例4: FeedRequest

        public override void FeedRequest(
            string _toId = "",
            string _link = "",
            string _linkName = "",
            string _linkCaption = "",
            string _linkDescription = "",
            string _picture = "",
            string _mediaSource = "",
            string _actionName = "",
            string _actionLink = "",
            string _reference = "",
            Dictionary<string, string[]> _properties = null,
            FacebookDelegate callback = null)
        {
            if(!isLoggedIn) return;

            string url = "https://graph.facebook.com/" + _toId +"/feed?method=post";
            if(_link.Length > 0) url += "&link=" +_toId;
            if(_linkName.Length > 0) url += "&name=" +_linkName;
            if(_linkCaption.Length > 0) url += "&caption=" +_linkCaption;
            if(_linkDescription.Length > 0) url += "&description=" +_linkDescription;
            if(_picture.Length > 0) url += "&picture=" +_picture;
            if(_mediaSource.Length > 0) url += "&source=" +_mediaSource;

            if(_actionName.Length > 0 && _actionLink.Length > 0) {
                url += string.Format("&actions=[{\"name\":\"{0}\",\"link\":\"{1}\"}]", _actionName, _actionLink);
            }

            if(_reference.Length > 0) url += "&type" +_reference;

            url += "&access_token=" + accessToken;

            StartCoroutine(GetFBResult(url, callback));
        }
开发者ID:OrlandoAguilar,项目名称:Orly,代码行数:34,代码来源:WindowsPhoneFacebook.cs


示例5: Request

 public void Request(
     Uri url,
     HttpMethod method,
     IDictionary<string, string> formData = null,
     FacebookDelegate<IGraphResult> callback = null)
 {
     AsyncRequestString.Request(url, method, formData, callback);
 }
开发者ID:facebook,项目名称:facebook-sdk-for-unity,代码行数:8,代码来源:AsyncRequestStringWrapper.cs


示例6: API

 public static void API(
     string endpoint,
     HttpMethod method,
     FacebookDelegate callback)
 {
     if(callback != null)
         callback(new FBResult());
 }
开发者ID:JeffreyKimani,项目名称:unityplugins,代码行数:8,代码来源:FB.cs


示例7: Login

        public override void Login(string scope = "", FacebookDelegate callback = null)
        {
            if (isLoggedIn)
            {
                FbDebug.Warn("User is already logged in.  You don't need to call this again.");
            }

            userId = "0";
            accessToken = "abcdefghijklmnopqrstuvwxyz";
            isLoggedIn = true;
        }
开发者ID:MizzKii,项目名称:PuruDash2D,代码行数:11,代码来源:EditorFacebook.cs


示例8: AppRequest

 public override void AppRequest(
     string message,
     string[] to = null,
     string filters = "",
     string[] excludeIds = null,
     int? maxRecipients = null,
     string data = "",
     string title = "",
     FacebookDelegate callback = null)
 {
     throw new UnityException("There is no Facebook AppRequest on Windows Phone 8");
 }
开发者ID:jieverson,项目名称:PixelRoad,代码行数:12,代码来源:WindowsPhoneFacebook.cs


示例9: AppRequest

 public override void AppRequest(
     string message,
     string[] to = null,
     string filters = "",
     string[] excludeIds = null,
     int? maxRecipients = null,
     string data = "",
     string title = "",
     FacebookDelegate callback = null)
 {
     fb.AppRequest(message, to, filters, excludeIds, maxRecipients, data, title, callback);
 }
开发者ID:bboy0623,项目名称:Flying-Wings,代码行数:12,代码来源:EditorFacebook.cs


示例10: Request

 internal static void Request(
     string url,
     HttpMethod method,
     WWWForm query = null,
     FacebookDelegate<IGraphResult> callback = null)
 {
     ComponentFactory.AddComponent<AsyncRequestString>()
         .SetUrl(url)
         .SetMethod(method)
         .SetQuery(query)
         .SetCallback(callback);
 }
开发者ID:roccolangeweg,项目名称:LumniBenderOfTime,代码行数:12,代码来源:AsyncRequestString.cs


示例11: AppRequest

 public override void AppRequest(
     string message,
     OGActionType actionType,
     string objectId,
     string[] to = null,
     List<object> filters = null,
     string[] excludeIds = null,
     int? maxRecipients = null,
     string data = "",
     string title = "",
     FacebookDelegate callback = null)
 {
     fb.AppRequest(message, actionType, objectId, to, filters, excludeIds, maxRecipients, data, title, callback);
 }
开发者ID:simsonimus,项目名称:Diplomarbeit,代码行数:14,代码来源:EditorFacebook.cs


示例12: AppRequest

 public override void AppRequest(
     string message,
     OGActionType actionType,
     string objectId,
     string[] to = null,
     List<object> filters = null,
     string[] excludeIds = null,
     int? maxRecipients = null,
     string data = "",
     string title = "",
     FacebookDelegate callback = null)
 {
     FBDebug.Info("App Request dialog is not implemented in the Unity editor.");
 }
开发者ID:schoolsout,项目名称:Schools-Out,代码行数:14,代码来源:EditorFacebook.cs


示例13: AppRequest

 public override void AppRequest(
     string message,
     OGActionType actionType,
     string objectId,
     string[] to ,
     List<object> filters,
     string[] excludeIds,
     int? maxRecipients ,
     string data,
     string title,
     FacebookDelegate<IAppRequestResult> callback)
 {
     FacebookLogger.Info("App Request dialog is not implemented in the Unity editor.");
 }
开发者ID:roccolangeweg,项目名称:LumniBenderOfTime,代码行数:14,代码来源:EditorFacebook.cs


示例14: FeedRequest

 public override void FeedRequest(
     string toId = "",
     string link = "",
     string linkName = "",
     string linkCaption = "",
     string linkDescription = "",
     string picture = "",
     string mediaSource = "",
     string actionName = "",
     string actionLink = "",
     string reference = "",
     Dictionary<string, string[]> properties = null,
     FacebookDelegate callback = null)
 {
     FBDebug.Info("Feed dialog is not implemented in the Unity editor.");
 }
开发者ID:schoolsout,项目名称:Schools-Out,代码行数:16,代码来源:EditorFacebook.cs


示例15: FeedRequest

 public override void FeedRequest(
     string toId = "",
     string link = "",
     string linkName = "",
     string linkCaption = "",
     string linkDescription = "",
     string picture = "",
     string mediaSource = "",
     string actionName = "",
     string actionLink = "",
     string reference = "",
     Dictionary<string, string[]> properties = null,
     FacebookDelegate callback = null)
 {
     fb.FeedRequest(toId, link, linkName, linkCaption, linkDescription, picture, mediaSource, actionName, actionLink, reference, properties, callback);
 }
开发者ID:galalmounir,项目名称:Flying-Dino,代码行数:16,代码来源:EditorFacebook.cs


示例16: API

        public virtual void API(
            string query,
            HttpMethod method,
            Dictionary<string, string> formData = null,
            FacebookDelegate callback = null)
        {
            Dictionary<string, string> inputFormData;
            // Copy the formData by value so it's not vulnerable to scene changes and object deletions
            inputFormData = (formData != null) ? CopyByValue(formData) : new Dictionary<string, string>();
            if (!inputFormData.ContainsKey(AccessTokenKey) && !query.Contains("access_token="))
            {
              inputFormData[AccessTokenKey] = AccessToken;
            }

            AsyncRequestString.Request(GetGraphUrl(query), method, inputFormData, callback);
        }
开发者ID:schoolsout,项目名称:Schools-Out,代码行数:16,代码来源:AbstractFacebook.cs


示例17: AppRequest

        public override void AppRequest(
            string message,
            string[] to = null,
            string filters = "",
            string[] excludeIds = null,
            int? maxRecipients = null,
            string data = "",
            string title = "",
            FacebookDelegate callback = null)
        {
            Dictionary<string, object> paramsDict = new Dictionary<string, object>();
            // Marshal all the above into the thing

            paramsDict["message"] = message;

            if (callback != null)
            {
                paramsDict["callback_id"] = AddFacebookDelegate(callback);
            }

            if (to != null)
            {
                paramsDict["to"] = string.Join(",", to);
            }

            if (filters != "")
            {
                paramsDict["filters"] = filters;
            }

            if (maxRecipients != null)
            {
                paramsDict["max_recipients"] = maxRecipients.Value;
            }

            if (data != "")
            {
                paramsDict["data"] = data;
            }

            if (title != "")
            {
                paramsDict["title"] = title;
            }

            CallFB("AppRequest", MiniJSON.Json.Serialize(paramsDict));
        }
开发者ID:keang,项目名称:gimmieunity,代码行数:47,代码来源:AndroidFacebook.cs


示例18: API

        public override void API(
            string query,
            HttpMethod method,
            Dictionary<string, string> formData = null,
            FacebookDelegate callback = null)
        {
            if (query.StartsWith("me"))
            {
                FbDebug.Warn("graph.facebook.com/me does not work within the Unity Editor");
            }

            if (!query.Contains("access_token=") && (formData == null || !formData.ContainsKey("access_token")))
            {
                FbDebug.Warn("Without an access_token param explicitly passed in formData, some API graph calls will 404 error in the Unity Editor.");
            }
            fb.API(query, method, formData, callback);
        }
开发者ID:bboy0623,项目名称:Flying-Wings,代码行数:17,代码来源:EditorFacebook.cs


示例19: API

        public void API(
            string query,
            HttpMethod method,
            Dictionary<string, string> formData,
            FacebookDelegate<IGraphResult> callback)
        {
            Dictionary<string, string> inputFormData;
            // Copy the formData by value so it's not vulnerable to scene changes and object deletions
            inputFormData = (formData != null) ? CopyByValue(formData) : new Dictionary<string, string>();
            if (!inputFormData.ContainsKey(Constants.AccessTokenKey) && !query.Contains("access_token="))
            {
                inputFormData[Constants.AccessTokenKey] =
                    FB.IsLoggedIn ? AccessToken.CurrentAccessToken.TokenString : "";
            }

            AsyncRequestString.Request(GetGraphUrl(query), method, inputFormData, callback);
        }
开发者ID:roccolangeweg,项目名称:LumniBenderOfTime,代码行数:17,代码来源:FacebookBase.cs


示例20: AppRequest

        public override void AppRequest(
                string message,
                OGActionType actionType,
                string objectId,
                string[] to = null,
                List<object> filters = null,
                string[] excludeIds = null,
                int? maxRecipients = null,
                string data = "",
                string title = "",
                FacebookDelegate callback = null)
        {
            if (string.IsNullOrEmpty(message))
            {
                throw new ArgumentNullException("message", "message cannot be null or empty!");
            }

            if (actionType != null && string.IsNullOrEmpty(objectId))
            {
                throw new ArgumentNullException("objectId", "You cannot provide an actionType without an objectId");
            }

            if (actionType == null && !string.IsNullOrEmpty(objectId))
            {
                throw new ArgumentNullException("actionType", "You cannot provide an objectId without an actionType");
            }

            var paramsDict = new Dictionary<string, object>();
            paramsDict["message"] = message;
            if (to != null)
            {
                paramsDict["to"] = string.Join(",", to);
            }
            if (actionType != null && !string.IsNullOrEmpty(objectId))
            {
                paramsDict["action_type"] = actionType.ToString();
                paramsDict["object_id"] = objectId;
            }
            if (filters != null)
            {
                paramsDict["filters"] = filters;
            }
            if (excludeIds != null)
            {
                paramsDict["exclude_ids"] = excludeIds;
            }
            if (maxRecipients.HasValue)
            {
                paramsDict["max_recipients"] = maxRecipients.Value;
            }
            if (!string.IsNullOrEmpty(data))
            {
                paramsDict["data"] = data;
            }
            if (!string.IsNullOrEmpty(title))
            {
                paramsDict["title"] = title;
            }

            UI(MethodAppRequests, paramsDict, callback);
        }
开发者ID:schoolsout,项目名称:Schools-Out,代码行数:61,代码来源:CanvasFacebook.cs



注:本文中的FacebookDelegate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Facing类代码示例发布时间:2022-05-24
下一篇:
C# Face类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap