Feed() публичный статический Метод

public static Feed ( string toId = "", string link = "", string linkName = "", string linkCaption = "", string linkDescription = "", string picture = "", string mediaSource = "", string actionName = "", string actionLink = "", string reference = "", string[]>.Dictionary properties = null, FacebookDelegate callback = null ) : void
toId string
link string
linkName string
linkCaption string
linkDescription string
picture string
mediaSource string
actionName string
actionLink string
reference string
properties string[]>.Dictionary
callback FacebookDelegate
Результат void
Пример #1
0
 public void PostOnFeed(
     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)
 {
     if (this.IsLoggedIn)
     {
         FB.Feed(
             toId,
             link,
             linkName,
             linkCaption,
             linkDescription,
             picture,
             mediaSource,
             actionName,
             actionLink,
             reference,
             properties,
             this.OnFeedCompleted);
     }
 }
Пример #2
0
    //feed renew ranking
    private void CallFBFeed()
    {
        if (GameRanking.instance != null)
        {
            GameRanking.instance.ButtonPrev(true);
        }

        Debug.Log("CallFBFeed() Start ");
        string FeedToId            = targetFid;
        string FeedLink            = "https://apps.facebook.com/vanishdiceworld/";
        string FeedLinkName        = Localization.Localize("44");
        string FeedLinkDescription = Localization.Localize("45").Replace("%s", targetName);
        string FeedLinkCaption     = Localization.Localize("46");
        string FeedPicture         = "https://fbcdn-photos-b-a.akamaihd.net/hphotos-ak-prn1/t39.2081/p128x128/851567_503332359777519_1897376422_n.png";
        string FeedMediaSource     = "";
        string FeedActionName      = "";
        string FeedActionLink      = "";
        string FeedReference       = "";
        Dictionary <string, string[]> feedProperties = null;

        FB.Feed(
            toId: FeedToId,
            link: FeedLink,
            linkName: FeedLinkName,
            linkCaption: FeedLinkCaption,
            linkDescription: FeedLinkDescription,
            picture: FeedPicture,
            mediaSource: FeedMediaSource,
            actionName: FeedActionName,
            actionLink: FeedActionLink,
            reference: FeedReference,
            properties: feedProperties,
            callback: FeedCallback
            );
    }
Пример #3
0
    public void Post(
        string toId            = "",
        string link            = "",
        string linkName        = "",
        string linkCaption     = "",
        string linkDescription = "",
        string picture         = "",
        string actionName      = "",
        string actionLink      = "",
        string reference       = ""
        )
    {
        if (!IsLoggedIn)
        {
            Debug.LogWarning("Auth user before posting, fail event generated");

            FBResult     res = new FBResult("", "User isn't authed");
            FBPostResult pr  = new FBPostResult(res);
            OnPostingCompleteAction(pr);
            return;
        }

        FB.Feed(
            toId: toId,
            link: link,
            linkName: linkName,
            linkCaption: linkCaption,
            linkDescription: linkDescription,
            picture: picture,
            actionName: actionName,
            actionLink: actionLink,
            reference: reference,
            callback: PostCallBack
            );
    }
Пример #4
0
    public void Post(
        string toId            = "",
        string link            = "",
        string linkName        = "",
        string linkCaption     = "",
        string linkDescription = "",
        string picture         = "",
        string actionName      = "",
        string actionLink      = "",
        string reference       = ""
        )
    {
        if (!IsLoggedIn)
        {
            Debug.LogWarning("Auth user before posting, fail event generated");
            dispatch(FacebookEvents.POST_FAILED, null);
            return;
        }

        FB.Feed(
            toId: toId,
            link: link,
            linkName: linkName,
            linkCaption: linkCaption,
            linkDescription: linkDescription,
            picture: picture,
            actionName: actionName,
            actionLink: actionLink,
            reference: reference,
            callback: PostCallBack
            );
    }
Пример #5
0
        private static void FeedInternal()
        {
            string text = "Я набрал " + GameLogic2d.Instance.GetCurrentScore().ToString() + " очков";

            FB.Feed(linkName: "My Game", linkDescription: text, linkCaption: "fregrth", callback: OnFeed);
            Debug.Log("FeedInternal");
        }
Пример #6
0
    private void CallFBFeed()
    {
        string FeedToId            = "";
        string FeedLink            = "https://apps.facebook.com/vanishdiceworld/";
        string FeedLinkName        = "Facebook!";
        string FeedLinkCaption     = "caption";
        string FeedLinkDescription = "description";
        string FeedPicture         = "https://fbcdn-photos-b-a.akamaihd.net/hphotos-ak-prn1/t39.2081/p128x128/851567_503332359777519_1897376422_n.png";
        string FeedMediaSource     = "";
        string FeedActionName      = "";
        string FeedActionLink      = "";
        string FeedReference       = "";
        Dictionary <string, string[]> feedProperties = null;

        FB.Feed(
            toId: FeedToId,
            link: FeedLink,
            linkName: FeedLinkName,
            linkCaption: FeedLinkCaption,
            linkDescription: FeedLinkDescription,
            picture: FeedPicture,
            mediaSource: FeedMediaSource,
            actionName: FeedActionName,
            actionLink: FeedActionLink,
            reference: FeedReference,
            properties: feedProperties,
            callback: FeedCallback
            );
    }
Пример #7
0
 /// <summary>
 /// See docs in <see cref="SoomlaProfile.UpdateStoryDialog"/>
 /// </summary>
 /// <param name="name">The name (title) of the story.</param>
 /// <param name="caption">A caption.</param>
 /// <param name="link">A link to a web page.</param>
 /// <param name="pictureUrl">A link to an image on the web.</param>
 /// <param name="success">Callback function that is called if the story update was successful.</param>
 /// <param name="fail">Callback function that is called if the story update failed.</param>
 /// <param name="cancel">Callback function that is called if the story update was cancelled.</param>
 public override void UpdateStoryDialog(string name, string caption, string description, string link, string picture,
                                        SocialActionSuccess success, SocialActionFailed fail, SocialActionCancel cancel)
 {
     FB.Feed(
         link: link,
         linkName: name,
         linkCaption: caption,
         linkDescription: description,
         picture: picture,
         callback: (FBResult result) => {
         if (result.Error != null)
         {
             fail(result.Error);
         }
         else
         {
             SoomlaUtils.LogDebug(TAG, "FeedCallback[result.Text]:" + result.Text);
             SoomlaUtils.LogDebug(TAG, "FeedCallback[result.Texture]:" + result.Texture);
             var responseObject = Json.Deserialize(result.Text) as Dictionary <string, object>;
             object obj         = 0;
             if (responseObject.TryGetValue("cancelled", out obj))
             {
                 cancel();
             }
             else
             {
                 success();
             }
         }
     });
 }
Пример #8
0
        /// <summary>
        /// See docs in <see cref="SoomlaProfile.UpdateStory"/>
        /// </summary>
        /// <param name="message">A message that will be shown along with the story.</param>
        /// <param name="name">The name (title) of the story.</param>
        /// <param name="caption">A caption.</param>
        /// <param name="link">A link to a web page.</param>
        /// <param name="pictureUrl">A link to an image on the web.</param>
        /// <param name="success">Callback function that is called if the story update was successful.</param>
        /// <param name="fail">Callback function that is called if the story update failed.</param>
        /// <param name="cancel">Callback function that is called if the story update was cancelled.</param>
        public override void UpdateStory(string message, string name, string caption,
                                         string link, string pictureUrl, SocialActionSuccess success, SocialActionFailed fail, SocialActionCancel cancel)
        {
//			checkPermission("publish_actions", ()=> {
            FB.Feed(
                link: link,
                linkName: name,
                linkCaption: caption,
                linkDescription: message,
                picture: pictureUrl,
                callback: (FBResult result) => {
                if (result.Error != null)
                {
                    fail(result.Error);
                }
                else
                {
                    SoomlaUtils.LogDebug(TAG, "FeedCallback[result.Text]:" + result.Text);
                    SoomlaUtils.LogDebug(TAG, "FeedCallback[result.Texture]:" + result.Texture);
                    var responseObject = Json.Deserialize(result.Text) as Dictionary <string, object>;
                    object obj         = 0;
                    if (responseObject.TryGetValue("cancelled", out obj))
                    {
                        cancel();
                    }
                    else     /*if (responseObject.TryGetValue ("id", out obj))*/
                    {
                        success();
                    }
                }
            });
//			}, (string errorMessage)=>{
//				fail(message);
//            });
        }
Пример #9
0
    void LinkAndPicture()
    {
        int       width  = Screen.width;
        int       height = Screen.height;
        Texture2D tex    = new Texture2D(width, height, TextureFormat.RGB24, false);

        // Read screen contents into the texture
        tex.ReadPixels(new Rect(0, 0, width, height), 0, 0);

        tex.Apply();
        byte[] screenshot = tex.EncodeToPNG();

        var wwwForm = new WWWForm();

        string picName = "Idioman_" + Time.time + ".png";

        wwwForm.AddBinaryData("image", screenshot, "InteractiveConsole.png");
        wwwForm.AddField("message", "Game Hay Qua");

        FB.Feed(
            linkCaption: "I'm playing this awesome game",
            picture: "InteractiveConsole.png",
            linkName: "Check out this game",
            //link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "Guest")
            link: "https://play.google.com/store/apps/details?id=com.bluebirdaward.Fuky.Jelly60s",
            mediaSource: "https://www.youtube.com/watch?v=dAXW1R_aoz4"
            );
    }
Пример #10
0
 public void TestFBFeedDialog()
 {
     Debug.Log("Entering Testing Facebook feed");
     FB.Feed();
     text.text = "Done with Feed Dialog";
     Debug.Log("Entering Testing Facebook feed");
 }
Пример #11
0
 public void ShareWithFriends()
 {
     FB.Feed(
         linkCaption: "I'm playing this awesome game",
         picture: "http://api.ning.com/files/KJoM9AiK6kAoFEppJZZq8RHn3TXBkQ8IdW98RlKw1PUS3-KJW9MVINUD8ryTOUgYJQzkaB5A-rXWdQNNsKDmk7DlVNra7tPI/FullMoonET.jpg",
         linkName: "Take Me To The Moon",
         link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
         );
 }
Пример #12
0
 // Button for send a facebook feed message
 public void feedButtonClicked()
 {
     FB.Feed(
         //linkCaption: "I just smashed " + GameStateManager.Score.ToString() + " friends! Can you beat it?",
         picture: "http://www.friendsmash.com/images/logo_large.jpg",
         linkName: "Checkout my Friend Smash greatness!",
         link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
         );
 }
Пример #13
0
 public void ShareWithFriends()
 {
     FB.Feed(
         linkCaption: "I'm playing this awsom game",
         picture: "http://blog.exiconglobal.com/corp/wp-content/uploads/2012/10/App-Icon-copy.png",
         linkName: "Check out this game.",
         link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
         );
 }
Пример #14
0
 public override void Publish(string content, string url, Action <bool> onShareComplete)
 {
     FB.Feed(link: url, linkDescription: content, callback: (FBResult result) => {
         if (onShareComplete != null)
         {
             onShareComplete(string.IsNullOrEmpty(result.Error));
         }
     });
 }
Пример #15
0
 public void ShareButton()
 {
     FB.Feed(
         link: appStoreURL,
         linkName: "I have just completed the " + GameManager.me.currentSelectedChallenge + " challenge",
         linkCaption: "Come join the Selfie Nation!",
         picture: "http://i.imgur.com/9fMgD17.png?1"
         );
 }
Пример #16
0
 public void ShareWithFriends()
 {
     FB.Feed(
         linkCaption: "Check out this awesome game!",
         picture: "http://playeditstudios.com/Ranger/RangerLogo.jpg",
         linkName: "I survived " + (playerControllerScript.getCurrentRound() - 1) + " rounds, I scored " + playerControllerScript.getCurrentScore() + " points and I killed " + playerControllerScript.howManyZombiesKilled() + " zombies!",
         link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
         );
 }
Пример #17
0
 //to share a simple post in the game
 public void share()
 {
     scoreManager = ScoreManager.getInstance();
     FB.Feed(
         linkCaption: "Download it Now and Play!",
         linkName: "I Scored " + scoreManager.getScore() + " in Lost John!",
         link: "http://apps.facebook.com/" + FB.AppId + "?/challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest"),
         picture: "http://www.itlosers.it/img/portfolio/cabin.png"
         );
 }
Пример #18
0
 //-------------------------------------------------------------
 //                      FacebookFeed
 //-------------------------------------------------------------
 public void FacebookFeed()
 {
     Debug.Log("FacebookFeed");
     FB.Feed(
         linkName: "CrazyWord",
         linkCaption: "이미지연상 & 게임으로 중독된다! 단어암기게임",
         link: "http://crazyword.org/",
         callback: onFeedComplete
         );
 }
Пример #19
0
    public void Share()
    {
        //FB. feed popup sharing box
        FB.Feed(linkCaption: "Ik speel WordUp",
                picture: "http://wordupgame.tk/Facebook/Images/Achievements/WordUp!.jpg",
                linkName: "Speel het ook!",
                link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")

                );
    }
Пример #20
0
        public void ShareWithFriends()
        {
            string shareMessage = "I just scored " + ShareScoreCounter.GetComponent <Text>().text + "points on " + ShareLevelCounter.GetComponent <Text>().text + ". You think You can beat me?";

            FB.Feed(
                linkCaption: shareMessage,
                picture: "https://lh3.googleusercontent.com/AJM4lHx7XgTO1S9fpIhCaiF4emgGnU_KMBW3jvnwv-hX0UhlNLTsLxFgFg1JIcu9lF4=w300",
                linkName: "Join me on this epic Berry Adventure",
                link: "https://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest"));
        }
Пример #21
0
 public void ShareFBScreenStart()
 {
     FB.Feed(
         linkCaption: "Chơi Game Nào",
         linkName: "Jelly 60S",
         //link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "Guest")
         link: "https://play.google.com/store/apps/details?id=com.Fuky.Jelly60s"
         //mediaSource: "https://www.youtube.com/watch?v=dAXW1R_aoz4"
         );
 }
Пример #22
0
    void post()
    {
        string message = Settings.instance.facebookMessage.Replace("%score%", gameManager.score.ToString());

        #if UNITY_ANDROID
        FB.Feed("", Settings.instance.linkAndroid, Settings.instance.facebookTitle, Settings.instance.facebookTitle, message);
        #else
        FB.Feed("", Settings.instance.linkIOS, Settings.instance.facebookTitle, Settings.instance.facebookTitle, message, Settings.instance.facebookPicture);
        #endif
    }
Пример #23
0
 private void PostToFeed(string message)
 {
     FB.Feed(
         link: linkUrl,                              //"https://www.facebook.com/pinballplanet/",
         linkName: linkName,                         //"Pinball Planet",
         linkCaption: "",
         linkDescription: message,
         picture: imageUrl                           //"http://www.pinball-planet.com/media/avatarsmall.png"
         );
 }
Пример #24
0
 void fbFeed()
 {
     FB.Feed(
         link: "https://example.com/myapp/?storyID=thelarch",
         linkName: "The Larch",
         linkCaption: "I thought up a witty tagline about larches",
         linkDescription: "There are a lot of larch trees around here, aren't there?",
         picture: "https://example.com/myapp/assets/1/larch.jpg",
         callback: LogCallback
         );
 }
Пример #25
0
 public static void Share(string name, string caption, string description, string image, string url)
 {
     if (IsAuthenticated)
     {
         FB.Feed("", url, name, caption, description, image, "", "", "", "", null, null);
     }
     else
     {
         AuthenticateAndShare(name, caption, description, image, url);
     }
 }
Пример #26
0
    /*
     * -----------------------------------------------------
     *                              FaceBook Share
     * -----------------------------------------------------
     */

    public void onSocialShareClicked(Dictionary <string, string> shareInfo)
    {
        Debug.Log("onSocialShareClicked");

        /*
         * 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 (FB.IsLoggedIn)
        {
            FB.Feed(
                FB.UserId,
                shareInfo ["link"],
                shareInfo ["subject"],
                shareInfo ["short"],
                shareInfo ["long"],
                shareInfo ["picture"],
                null,
                null,
                null,
                null,
                null,
                appFeedCallback);
        }
        else
        {
            if (socialPost != SocialPost.NONE)
            {
                socialPost     = SocialPost.NONE;
                socialPostData = null;

#if PROPELLER_SDK
                PropellerSDK.SdkSocialShareCompleted();
#endif
                return;
            }

            socialPost     = SocialPost.SHARE;
            socialPostData = shareInfo;

            trySocialLogin(false);
        }
    }
Пример #27
0
 void FBfeed()
 {
     FB.Feed(
         linkCaption: "I'm playing this awesome game",
         picture: "",
         linkName: "Check out this game",
         //link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "Guest")
         link: "https://play.google.com/store/apps/details?id=com.Fuky.Jelly60s"
         //mediaSource: "https://www.youtube.com/watch?v=dAXW1R_aoz4"
         );
 }
Пример #28
0
 public void ShareWithFriends()
 {
     ds.debugTxt += "ShareButtonClicked!\n";
     FB.Feed(
         linkCaption: "I'm playing this awesome game",
         picture: "http://ilhaeye.com/RITS/icon.png",
         linkName: "Check out this game",
         linkDescription: "Runner Game",
         link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
         //link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
         );
 }
 public static void Share(string name, string caption, string description, string image, string url)
 {
     //if not yet authenticated try to authenticate
     if (!IsAuthenticated)
     {
         Authenticate();
     }
     if (IsAuthenticated)
     {
         FB.Feed("", url, name, caption, description, image, "", "", "", "", null, null);
     }
 }
Пример #30
0
    private void PostOnFacebook()
    {
        lastResponse = "PostOnFacebook called";

        FB.Feed(
            link: "https://play.google.com/store/apps/details?id=com.HalfBit.ExperimentalGame1",                // Google Play Store
//			link: "http://www.amazon.com/gp/mas/dl/android?p=com.HalfBit.ExperimentalGame1",		// Amazon App Store
            linkName: "Fatal Swipe game for Android",
            linkCaption: "Hard puzzle game with retro look",
            linkDescription: "Can you solve these difficult puzzles?",
            callback: PostCallback
            );
    }