I am using the Blackberry Facebook sdk from http://sourceforge.net/projects/facebook-bb-sdk/.
The PDF included in the zip file says that attach/include the two .jar files in the Project using eclipse and then use the methods to get user information from facebook.
Including the jar files is fine but when i call the methods and try running the app i get a Run time exception " java.lang.noClassDefFoundError ". No compilation error but a runtime error. I have tried cleaning up the BB 9900 Simulator but it doesn't work. I am pasting the code that causes the runtime exception.
String NEXT_URL = "http://m.facebook.com/login.php";
String APPLICATION_ID = "318512824926003";
APPLICATION_SECRET = "e0e532b55a4586ec2fb0eddf4eed12b1";
String[] PERMISSIONS = Facebook.Permissions.USER_DATA_PERMISSIONS;
ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
Facebook fb = Facebook.getInstance(as);
Inserting the above code causes the runtime exception. Many users have told that this works but have not provided a simple and end solution. So please help.
Thank you.
great.. i got it working.. I retrieved the email id of the FB user by adding a parameter to LoginScreen.java file.
Parameter added : "email"
"http://www.facebook.com/dialog/oauth?scope=publish_stream,offline_access,email&redirect_uri=" + pfbc.getNextUrl() + "&response_type=token&display=touch&client_id=" + pfbc.getApplicationId()
Guys if u need any help integrating FB Connect to your BB App please email me at alvin.chettiar#hotmail.com . I will be glad to help. I know the head banging that i went through.
Related
hi i have unity3d and the latest facebook sdk
i've downloaded the sample project but i got a problem, when i start the project and click login, unity immediately show this images:
which i expecting i've got an error from this part of code in mainmenu.cs
if (FB.IsLoggedIn)
{
string panelText = "Welcome ";
if (GameStateManager.Username != null) panelText += GameStateManager.Username + "!";
else panelText += "Smasher!"; //I GOT THIS ELSE BLOCK !
if (GameStateManager.UserTexture != null)
GUI.DrawTexture( (new Rect(8,10, 150, 150)), GameStateManager.UserTexture);
GUI.Label( (new Rect(179 , 11, 287, 160)), panelText, MenuSkin.GetStyle("text_only"));
}
which is my gamestatemanager.username is null... i just want to know why my gamestatemanager.username is null, how to get some data to fill that.. i've followed step to fill gamestatemanager.username in this link where's my error btw ? anyone can help ?
Please see this question. Unity Facebook SDK Login Always Returns User 0 Access Token abc...z We don't support the editor or desktop yet. You will have to run on an ios or android device, or publish your app to facebook canvas.
I think you are having the same problem I am...
It seems it has logged you in but returns USerID:0 and Access Token: abcdefghijklmnopqrstuvwxyz
I think this is a TEST User that is automatically logs in but I can't seem to find out how to turn that off and to actually have it log ME on.
Is your APP in Sandbox mode? I tried turning my sandbox mode in the facebook app settings off but it didn't seem to effect it...
Waiting for an answer on this and my related question...
Unity Facebook SDK Login Always Returns User 0 Access Token abc...z
If you are running this from the EDITOR then the reason is the EDITOR does not actually log you in.
If you are running from the device...I am still working on that one (also getting the same result you are)
I am using Unity Facebook SDK for facebook login in my Unity project. After login gets successful I am trying to use logInSync through ParseFacebookUtils. I am not getting any data in Parse cloud browser.
I got all the parameters like accessToken, userId, tokenExpiration from Facebook SDK and this is the I tried in unityscript. When i tried this on my Android device
var logInTask:Task = ParseFacebookUtils.LogInAsync(accessToken, userId, tokenExpiration);
There is no error but nothing happened in cloud browser data as well. Now I thought this might be because I removed "ParseUser" from Task.
So I tried to put ParseUser in the code and used this code
var logInTask:Task<ParseUser> = ParseFacebookUtils.LogInAsync(accessToken, userId, tokenExpiration);
I get these errors in unity editor log
Unexpected token: <
';' expected. Insert a semicolon at the end
Unexpected token: >
';' expected. Insert a semicolon at the end
Simple SaveAsync is working for me like
var testTask:Task = testObject.SaveAsync();
And my data gets saved in cloud browser data.
Someone help me out with Facebook Login and Signup in Parse.
Apparently you have to change the order for your parameters.
Got this reply from Parse guys to solve this problem
"You just need to fix the order of your parameters using something like this:"
ParseFacebookUtils.LogInAsync(FB.UserId, FB.AccessToken, DateTime.Now);
Original link to the answer:
https://www.parse.com/questions/parsefacebookutilsloginasync-is-not-working-in-unity3d#answer-you-just-need-to-fix-the-order-of-your-parameters
I want my game player to able to post game score to his facebook wall from WP7 game. I have gone through following tutorials
1> Tutorial: Logging Into Facebook with Windows Phone 7 (Silverlight) (source code is downloaded from their website.)
PROBLEM: After running sample project, i can login to facebook, but can't figure out how to post the message.
2> I have download sample project from github.
PROBLEM: When i open the project for WP7, a window pop up saying "Solution folder are not supported in this version of application. solution folder '.nudget' will be displayed as unavailable."
I have tried downloading nuget updates as suggested by Prabir's Blog.
3> With this tutorial, i am able to login to facebook.
PROBLEM: unable to post any message. it display inside emulator "The remote server returned an error:NotFound".
please let me know if you find this question inappropriate or lack of research, i will romove question immediately.
I am novice to both WP7 and C#. Please help me to correct above problems.
Thanks in advance
EDIT : Finally got 3rd one working by making small changes in PGLogin.xaml.cs, just change "PRE" to "pre" in "wbLogin_LoadCompleted" method. but still not much satisfy. because its work and sometime don't. it's not stable. and don't know how to logout. any suggestion?
Another user had this exact issue, it was resolved using the following code:
var args = new Dictionary<string, object>();
args["name"] = "Check this out";
args["link"] = "www.xyz.com";
args["caption"] = "";
args["description"] = "description";
args["picture"] = "";
args["message"] = "Check this out";
args["actions"] = "";
FacebookAsyncCallback callBack = new FacebookAsyncCallback(this.postResult);
fbApp.PostAsync("me/feed", args, callBack);
private void postResult(FacebookAsyncResult asyncResult)
{
System.Diagnostics.Debug.WriteLine(asyncResult);
}
Post to Facebook wall using WP7 and Facebook.dll
ShareLinkTask shareLinkTask = new ShareLinkTask();
shareLinkTask.Title = "Divum Photo Browser";
shareLinkTask.LinkUri = new Uri(list_photos.ElementAt(index_).imageUrl, UriKind.Absolute);
shareLinkTask.Show();
I know this might sound a very basic question but I am having an issue in using Facebook SDK for Blackberry. I have downloaded the latest one 0.8.25. I have imported them in my eclipse and they are present in the referenced libraries. I have a game app where I want the users to login using their facebook account. Which class contains the code for logging in? Are the jar files implementable or they are just for reference? I have read forums posts where users say that they executed Strawberry program but I can no where find any executable source code. Kindly please let me know how do I create a login page for BlackBerry using its SDK. I did go through another link of Sample Code here!
Let me know which class has login code or how do i use the SDK
At the very basic least, you need to get an instance of the Facebook object and call getCurrentUser(). So, for example:
String[] permissions = new String[] { Facebook.Permissions.ALL_PERMISSIONS };
Facebook fb = Facebook.getInstance(new ApplicationSettings(myNextUrl, myAppId, myAppSecret, permissions));
User fbUser = fb.getCurrentUser();
The code in the library will handle all of the details like getting the user to login to facebook account and accept the requested permissions and so on. You'll want to wrap that all in a try/except to catch FacebookException for error conditions (e.g. user refuses your request).
I'm trying to run the samples but having a couple of problems.
1. the CASPNETWebRegistrationForm - I get an error of "Invalid 'client_id'." when I run app. I've set the app id and key in web.config.
I just can't get the CASPNETWebsite to run - I always get a response from Facebook that says "An error occured - please try again later"
The URL returned from Facebook is https://www.facebook.com/dialog/permissions.request?api_key={185034998201688}&app_id={185034998201688}&display=popup&fbconnect=1&locale=en_US&method=permissions.request&next=http://static.ak.fbcdn.net/connect/xd_proxy.php%23cb%3Df9b7e2c4%26origin%3Dhttp%253A%252F%252Flocalhost%253A5000%252Ff7f1e1a04%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df36d8dadac%26result%3D%2522xxRESULTTOKENxx%2522&return_session=1&sdk=joey&session_version=3
I notice the api-key and the app-id are the same... but I have correctly setup web.config.
Any thoughts ?
I could be wrong, I'm not having much luck with the samples, though I believe you should leave out the curly braces in the config ie.
appId = "185034998201688"
appSecret = "185034998201688"
Have you filled out all the facebook application settings on the facebook webpage. I found i was missing the Canvas URL and a few other URLs, and filling this out made things work a little better.