I am trying to share to facebook from my app I followed this tutorial bascially copy and paste
https://developers.facebook.com/docs/android/share-dialog/#setup
but when I run the example the error I get back is
Error: com.facebook.FacebookException
That is it with no more details. I have triple checked by app hash and it is correct
I was using openForPublish instead of openForRead which is counter intuitive but still works. The Facebook Share Dialog doesn't need publish permissions to work
Related
I am trying to integrate the ok.ru sdk for an iOS game following these instructions.
The app is created on the website following instructions mentioned here. But when I try to post something, I get the error message
"Indicated redirect_uri is not registered in App Settings.
redirect_uri:ok1139715840://authorize"
The problem is that the redirect uri contains the app id that is obtained only after app creation.
According to this link, the redirect uri needs to be mentioned when creating the app. I cant even go back and edit the app settings as when I click on the app, it says "Page not found".
Has anyone successfully integrated this sdk?
Can some instructions be provided (in english) on how to do this successfully and get rid of the current error??
The same error will arise with the android sdk as that also a redirect uri as shown in the link above.
Go to odnoklassniki API page, and chan your application url to "http://localhost" while you developing.
Once it's in production then change with your site.
API page : http://apiok.ru
Finally figured out:
You have to scroll to the bottom of the page and then you will find an App Settings button. Click on it, enter your application secret and then you will be able to edit the app settings.
Just go to the app settings in Odnoklassniki and add ok1139715840://authorize to accepted redirect_uri list
I am building an android app which needs to share some content (image + text) to Facebook, using facebookDialog. The dialog works perfectly when using a Facebook developer account, but when using a regular account, the dialog appears and then disappears instantly. I have tried passing FORCE_DIALOG_AUTH, as i have seen in some similar posts, but in the best case it just keeps the dialog opened a couple more seconds. Code is pretty straight-forward:
FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(getActivity())
.setLink("https://developers.facebook.com /android").setDescription("a description")
.setPicture(mPlant.default_document().getServerImagePath())
.build();
LE: it looks like the dialog only works with the developer account which generated the app id, the problem is with any other fb account
Thanks in advance
> hope this image makes it clear that unless you make this app live you
> cannot test it from other account.
> There are solutions to add tester
> accounts if you want to test it from any other account instead of developer account,
> then in "Roles" tab add a tester account,then test
> through this account.
Please provide error log so that it's easy to find your bug. But while using Facebook SDK in your app, you need to follow a few procedures:
Register your app on Facebook. After registering you will get a Facebook ID.
After that you need to provide your apps package name and class name in which you are using Facebook.
You need to add your hash key to the Facebook setting page.
Found the answer. It needed Facebook app to be updated. strange thing at least they could have propagated correct message that could have save our time.
I tried restarting my `phone but didn't work. I tried same source code on different 'phone and everything started working. I have no clue on what's wrong in the phone that I was working with.
Hope this could help someone.
I use parse sdk and scringo in my app , parse works fine for my login with facebook so app_id is set correctly , but when login via scringo it just shows please wait
any help !!
Logcat
Scringo(11060): You need to set the facebook app id in the manifest. See https://developers.facebook.com/docs/tutorials/androidsdk/3.0/upgrading-from-2.0-to-3.0/#login
how to go ahead with facebook sdk and scringo , the site is not informative and even the api docs dont explain much , no reply over email so i have to turn to SO for help
EDIT:
I use broadcast receiver now as per their guides , how to login correctly
http://www.scringo.com/docs/android-guides/popular/handling-login-status-changes/
What you're describing is a problem common to all Facebook libraries, you need to create an application on Facebook and get an id/key (http://www.scringo.com/docs/android-guides/popular/connect-to-social-networks/), most libraries then require that you set it in the manifest. I haven't used this library, if you want to try using https://github.com/sromku/android-simple-facebook I can provide more help (if you need it, Simple Facebooks guide is pretty good), otherwise this hopefully makes it clear what you're missing
According to their quick start guide, Scringo it turns out also has it's own App Ids which you get through a dashboard, take a look here: http://www.scringo.com/docs/android-guides/quickstart/
I had the exact same issue.
I fixed it by adding my scringo app id in the scringo.properties file under the assets folder of my project:
scringo.app.id="your_scringo_app_id"
Hope it helps.
I want to make MyApp name show on the upper space as Facebook Samples shown.
But even the source code is the same with the sample's, the raw/layout data are the same, too. I don't know why MyApp shows only "You must log in first".
Is anything I missed?
Now I put my whole source code up to the share space: http://qfs.mobi/f689673
And I found it seems not login successful if I input the right information.
Finally, I found the problem..
I change to use the Facebook Sample And run with my app_id. And then I found there are error code when login dialog shows. "This app is in sandbox mode."
God! Isn't sandbox mode for "Developers"? Seems I misunderstand..
Since this a problem is with the webpage shown by the facebook sdk, it doesn't seem to be an issue with your android code, but rather with the way your facebook app is defined in the app center.
The SDK basically redirects you to this link: https://m.facebook.com/dialog/oauth?app_id=xxx&redirect_uri=fbconnect://success (replace xxx with your app_id). Try going to the link when you are not logged in or when you are in incognito mode, you should see the login screen as such: http://imgur.com/xeqigSu
You could check a couple of things:
That your app is live. Check this on your app basic settings page
Try changing the language on the login page and see if that helps, since your app is in a language other than English
go in android setting,then Applications,Manage applications,find your browser and clear data,it works as usual!
When i run the Sample Android App from Facebook SDK 3.0 for Android i'm getting the error page "Misconfigured for Facebook Login. Press Okay to go back to the application without connecting to Facebook".
There is already a Facebook app in the device, if i uninstall that app the sample app getting me to login page of facebook. In logcat im getting the Error as " Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider". I have given the hash key in dash board of facebook and also given the APP ID in the app. In dashboard i didnt find any option like enabling Single Sign on.
This might be a duplicate question. But i'm unable to find the solution to make the sample app run even a facebook app already exists in device. Help me to sort it out. Thanks in advance.
In the developer dashboard, under "Native Android App", you also need to set "Facebook Login" to "Enabled". "Facebook Login" is the new name for "Single Sign on".
If that does not work...
If you are logging in with a Session, try adding this code to your Session.StatusCallback call method:
if (exception != null) {
exception.printStackTrace();
}
If you are using LoginButton to log in, implement LoginButton.OnErrorListener with the above code, and add the listener when the LoginButton gets created.
The resulting logcat should give you more information about what the problem is.
Regarding the "Failed to find..." error:
Use a real device and make sure you have the latest version of the Facebook app installed. The Facebook app included in the sdk is not recent enough to support attribution ids.
Follow the step 4 correctly from the following link :-
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
I think you have missed the keytool part from it where you have to add key hash to your developers account or you are not importing the FacebookSDK library in sample project.