Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by EduSRVT · Oct 19, 2013 at 01:23 AM · facebookissuesdkcallback

Facebook sdk FB.Feed Don't execute the Callback.

Hi.

Why the callback in FB.Feed is not being called? is it normal? Im using last facebook sdk version.

Thank you.

public class Feed : MonoBehaviour { #region FB.Init() example

 private bool isInit = false;

 private void CallFBInit()
 {
     FB.Init(OnInitComplete, OnHideUnity);
 }

 private void OnInitComplete()
 {
     Debug.Log("FB.Init completed");
     isInit = true;
     CallGetAuthResponse();
 }

 private void OnHideUnity(bool isGameShown)
 {
     Debug.Log("Is game showing? " + isGameShown);
 }

 #endregion
 
 #region FB.Login() example

 private void CallFBLogin()
 {
     FB.Login("email,publish_actions,user_about_me", Callback);
 }

 #endregion
 
 #region FB.GetAuthResponse() example

 private void CallGetAuthResponse()
 {
     FB.GetAuthResponse(Callback);
 }

 #endregion
 
 #region FB.Feed() example

 public string FeedToId = "";
 public string FeedLink = "";
 public string FeedLinkName = "";
 public string FeedLinkCaption = "";
 public string FeedLinkDescription = "";
 public string FeedPicture = "";
 public string FeedMediaSource = "";
 public string FeedActionName = "";
 public string FeedActionLink = "";
 public string FeedReference = "";
 public bool IncludeFeedProperties = false;
 private Dictionary<string, string[]> FeedProperties = new Dictionary<string, string[]>();

 private void CallFBFeed()
 {
     Dictionary<string, string[]> feedProperties = null;
     if (IncludeFeedProperties)
     {
         feedProperties = FeedProperties;
     }
     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: delegate(FBResult result) { consoleLog = "feeed calleed"; }
     );
 }

 #endregion
 
 private string consoleLog;
 
 void OnGUI()
 {
     GUI.Label(new Rect(0,0,Screen.width,70), consoleLog);
     
     if(GUI.Button (new Rect(0,Screen.height-100,100,100), "Init"))
     {
         CallFBInit();
     }
     
     if(GUI.Button (new Rect(100,Screen.height-100,100,100), "Login"))
     {
         CallFBLogin();
     }
     
     if(GUI.Button (new Rect(200,Screen.height-100,100,100), "Feed"))
     {
         CallFBFeed();
     }        
 }
 
 void Callback(FBResult result)
 {
     consoleLog = result.Text;
 }

}

Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image brian_jew · Oct 21, 2013 at 06:15 PM 0
Share

Which platform are you exporting to?

avatar image MirekPluta · Oct 31, 2013 at 07:33 PM 0
Share

Have exactly the same problem on Android build. Any ideas?

avatar image Crazydadz · Nov 21, 2013 at 11:59 PM 0
Share

I have almost the same problem. Plateform iOS. The callback is working but the result always return "cancelled".

avatar image Petro19 · Dec 15, 2013 at 03:39 PM 0
Share

the same problem on iOS. result always: {"cancelled":true}

avatar image plasticYoda · Jan 03, 2014 at 01:34 AM 0
Share

I'm using FB SD$$anonymous$$ 4.3.6 with an Android system, and I'm not getting the callback. From LogCat I see the following:

D/FacebookSD$$anonymous$$.WebDialog(18781): Webview loading URL: https://m.facebook.com/dialog/feed D/FacebookSD$$anonymous$$.WebDialog(18781): Redirect URL: fbconnect://success?post_id=100004516925128_243538025806760 V/FBUnitySD$$anonymous$$(18781): sending to Unity OnFeedRequestComplete({"id":"100004516925128_243538025806760"})

However, my callback function is never actually called.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by kanpot2002 · Feb 18, 2014 at 04:08 PM

I found the same problem and think this should help you

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Web Player WWW Call 0 Answers

Will Facebook Gameroom SDK work with mobile as well? 0 Answers

Getting multiple photos at once but in the correct order with Facebook SDK 1 Answer

Unity: Is there any alternative to facebook SDK for facebook ads attribution? 0 Answers

Facebook SDK(android) - error 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges