I am trying to integrate FB in my android app ( first integration ).
I am able to successfully login and log out.
But I am unable to display information after logging in.
I have tried setting the text of a textView display for user name in onSuccess () of FacebookCallback.Also I have used correct permissions as Array.list(...).Along with onCurrentProfileChanged() of ProfileTracker, which is written in onCreate() of the fragment containing the FB login button.
Plz help.
I won't mark this as 'duplicate', but there has been a lot of people who have asked 'very' similar questions.
You'll need to provide more detailed information, including logcat logs/stack traces of what "doesn't work" when you try it. etc. If you want more detailed help.
Here is a list of previous questions (sorted by most votes). This might help you also.
https://stackoverflow.com/search?tab=votes&q=android%20facebook%20integration
Related
I'm having a problem with publish_actions. I added publish_actions to Items, but got the error shown below:
It looks like you haven't made any API requests to access content
with the publish_actions permission in the last 30 days.
Please let me know how to fix this.
Are you in a situation of asking for the new "login review"? If so, I suspect (not sure) that Facebook checks that you, as the admin of the app, also uses the app and go through the relevant logic. I may be wrong, but see if it helps.
Previous answers do help. But for those who struggled like me, here's the trick:
You have to use the API to post something, but you can't just do that with any Facebook user. You have to use the APP OWNER's account. That's the Facebook user that you used to login to developers.facebook.com
None of any other accounts counts. Only that one can do it. When they say "YOU". They mean literally.
Hope this helps others with the same problem.
Same problem with me .So I have a create dummy application using facebook graph api in which pubish_actions permission is used to post the data and when I login and post the data with another facebook id then it shows error of denied permission then i go again and submit the items again .The error goes it self .
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 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!
I am a newbie and devleoping an app which uses facebook login and the details which we get after logging from facebook for further interactions. Two days back it was running fine but today it stopped running its just showing CURRENT GOALS screen and no button to do ok or cancel or anything of that sort. Just see this link
https://m.facebook.com/dialog/oauth?redirect_uri=fbconnect%3A%2F%2Fsuccess&display=touch&type=user_agent&client_id=307234779396415&ret=login&ext=1368864103&hash=AeZ9mMBQfC22WXj_&refid=9&_rdr
I am using the Facebook Dialog class to achieve the login but in the facebook sdk also the graphSampleApi sample project is running with same problem.
Please help I need to the login badly and my project deadline is today. Please help.
Thanks in advance.
try this simplier URL for log in ::
https://www.facebook.com/dialog/oauth?client_id=307234779396415&redirect_uri=https://www.facebook.com/connect/login_success.html&display=touch&scope=publish_stream
See my answer on this similar/duplicate question: FbDialog doesn't show full content on smaller devices
Basically, it looks like Facebook changed the code in these web dialogs and something in their javascript is not executing properly on some Android devices. The Cancel/OK buttons are there in the page content, but hidden, and the javascript is failing before the buttons are shown.
You can inject JavaScript to hide the "Current Goals" until FaceBook fixes their API.
See my answer here for details:
webDialog "CURRENT GOALS" header but no button to authorize or cancel
I have an application that authenticates users through the LinkedIn API. My questions:
is it possible for an application to like messages to all users who authorized it?
is it possible to get like list of a message to a subset of the application users?
I've been looking for a while, and can't find anything.
Via the Groups API of the LinkedIn APIs, you can like a post in a particular group using the following JavaScript code (XXXX is the particular post id):
IN.API.Raw('/posts/XXXX/relation-to-viewer/is-liked')
.method('PUT')
.body("true")
.result(function(result) {
alert(JSON.stringify(result));
})
.error(function(result) {
alert(JSON.stringify(result));
});
However, keep in mind that likes should not be automated but user initiated - only users who have authenticated your app should be liking posts, and only when they manually choose to do so. Writing a script that automatically likes all posts from any user that posts a message from your app is against the LinkedIn API terms of service.
Can't confirm for sure but maybe this link about likes can help u and give a clues about possible options.. Reported example you can find here or here. However I have no guaranty that this works cause I am not author of those posts.. Maybe u will find better and more accurate answer at LinkedIn API forum..
Hope it helped a bit.. Cheers