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 DanSarpe · Feb 08, 2015 at 01:16 PM · facebooklogin

Facebook Login " Invalid App Id : 0 "

Hi!

I developed an android game " Uberman " that has login/share/invite functions.

My facebook script looks like this : using UnityEngine; using UnityEngine.UI; using System; using System.Collections; using System.Collections.Generic; using System.Linq;

public class Test : MonoBehaviour {

 public string status = "Ready";
 public string lastResponse = "";


 void Awake(){

 }
 
 void Start(){
             FB.Init (OnInitComplete, OnHideUnity);
             status = "FB.Init() called with " + FB.AppId;
             Debug.Log (status);
 }

 
     #region FB.Init() example
 
 private void OnInitComplete()
 {
     Debug.Log("FB.Init completed: Is user logged in? " + FB.IsLoggedIn);
 }
 
 private void OnHideUnity(bool isGameShown)
 {
     Debug.Log("Is game showing? " + isGameShown);
 }

 public void mm() {

     FB.Login("email", LoginCallback);
     }
 public void ShareWithFrinds()
 {
     FB.Feed (
         linkDescription: "Uberman wants to fly home  !!",
         linkCaption: "What's your HighScore?",
         picture: "http://www.expotehnica.ro/data_files/product_photos/1533/thumb_1.jpg",
         linkName: "Bored of killing pigs, flapping birds and crushing candy? Check this out, on Google Play !",
         link: "https://play.google.com/store/apps/details?id=com.MODgaming.UberMan"  + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
         //            link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag=" + (FB.IsLoggedIn ? FB.UserId : "guest")
         );
 }
 
 public void InviteFriends()
 {
     FB.AppRequest (
         message: "Wanna play ?: ");
     
 }
     
 #endregion

 void LoginCallback(FBResult result)
 {
     if (result.Error != null) {

         lastResponse = "Error Response:\n" + result.Error;
                     Debug.Log (lastResponse);
             }
     else if (!FB.IsLoggedIn)
     {

         lastResponse = "Login cancelled by Player";
         Debug.Log(lastResponse);

     }
     else
     {

         lastResponse = "Login was successful!";
         Debug.Log(lastResponse);


 
     }
 }

}

In unity, it all works just fine. But on an android device, if i try to login, it opens Facebook and says Error " Invalid App Id : 0 ".

Has anybody encountered this ?

Comment
Add comment · Show 4
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 rodude123 · Feb 10, 2015 at 09:33 PM 0
Share

can you give me the assets that will make you share to facebook. Then i can find out what the problem is for you

avatar image DanSarpe · Feb 16, 2015 at 04:44 PM 1
Share

Hi Rodude123 ! Can you give me an email so i can upload the assets ? Thanks in advance for the helping hand ! PS : if you can make this work, i'll give to you 10% of everything i make from this game :D

avatar image rodude123 · Feb 16, 2015 at 10:56 PM 0
Share

Hi DanSarpe here is my e-mail address: rohitpai2008@yahoo.co.uk

(tip: put the whole project into a zip folder and then send it to me). I will fix the problem as soon as possible. You don't have to give me 10% of everything you make, if you do put it on the app store you could put my name in the credits

avatar image rodude123 · Feb 17, 2015 at 02:05 PM 0
Share

can you give me your e-mail address so I know which one to look out for, thanks

0 Replies

· Add your reply
  • Sort: 

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Facebook SDK v4.2.4 - Android - Login not working 11 Answers

Facebook Unity SDK login permission request pop up for authorized user 0 Answers

Logging in with Facebook SDK from the Web Player 1 Answer

Facebook SDK doesn't work in Smartphones 0 Answers

Facebook SDK: FB.Feed not posting 2 Answers


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