facebook-android-sdk

Facebook android: passing facebook object between activities

我的梦境 提交于 2019-12-24 00:59:21
问题 I want to make an application that user will login in one activity with a button which call facebook login thing from facebook_android_sdk and I want to send a wall post in second activity which comes after user logins. I want to pass facebook object between activities. I tried serializable and parcelable, but didn't work ! Can someone guide me for this ? Thanks anyway 回答1: Save your token and expires via SharedPerferences, then create new Facebook object in second activity, set token and

How to get user birthday and online status with facebook SDK for android

我只是一个虾纸丫 提交于 2019-12-24 00:06:16
问题 I am writing android application with SDK and I need to get other users's (not /me) birthday/age and online status? Is this possible? Tried following: accessing /{user-id} with GraphRequest, but this returns only name and id adding fields=age_range and user_birthday permissions doesn't help i am not able to make FQL queries, because they are deprecated since 2.0 and my access token which I get from android login, has FQL limitation. Any ideas how else I can get user's ages/online statuses?

Get Date of Birth and Town/City from Facebook SDK GraphUserCallback

南楼画角 提交于 2019-12-23 19:27:20
问题 I have facebook loggin set up within my app like below, the idea is to login and then do a GraphUserCallback so we can get the use information and then pass to my own register system so a user account can be set up for my app. Request.executeMeRequestAsync(session, new Request.GraphUserCallback() { @Override public void onCompleted(GraphUser user, Response response) { if (dialog != null && dialog.isShowing()) { dialog.dismiss(); } if (user != null) { Map<String, Object> responseMap = new

Facebook: sharing a Play Store link using the Share Dialog

寵の児 提交于 2019-12-23 17:41:34
问题 I share a link using the share dialog from the Facebook Android SDK. My code looks like this: FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(this) .setName("My app name") .setCaption("A caption") .setDescription("My description...") .setLink("https://play.google.com/store/apps/details?id=com.company.myapp") .setPicture("http://link_to_picture") .build(); As I want users to be redirected to my app's Play Store page, I put this url in the link. But in that case, the post

Posting photo from a native ShareDialog in Facebook android SDK

时光毁灭记忆、已成空白 提交于 2019-12-23 11:05:18
问题 I am trying to post an image to the Facebook using SDK v3.6 ShareDialog. As a result I got com.facebook.FacebookException: Error retrieving image attachment. I did just like Doc says: private void ShareDialog(){ OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class); //action.setProperty("game", "https://example.com/cooking-app/meal/Lamb-Vindaloo.html"); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.icon); List<Bitmap> images = new ArrayList

Facebook login with Android SDK 3.0 causing ANRs or not working at all

╄→尐↘猪︶ㄣ 提交于 2019-12-23 07:28:22
问题 In order to log a user in to Facebook in an Android app, I'm trying to use the following code. After the user has been logged in, all their friends' locations should fetched. Unfortunately, this code causes ANRs sometimes (as reported in the Google Play developer console) and sometimes it just doesn't work. If I remove the app inside Facebook (revoke permissions), the permission dialog is shown again on the next launch of the Android app. But if the app has the permissions already, it causes

Fetch Facebook user details in android

别来无恙 提交于 2019-12-22 09:54:47
问题 I am developed a app in android in which i fetch user details from Facebook. I am able to fetch user name, firstname, lastname but email comes null in some Facebook account. In some Facebook account I found email id and some Facebook account email is null why? 回答1: The problem is the email permission this is the working code for getting email id. It is given by me here Unable to access facebook login? Session.openActiveSession(this, true, new Session.StatusCallback() { // callback when

Where does this error come from? Error: com.facebook.FacebookException: Failed to get app name

六月ゝ 毕业季﹏ 提交于 2019-12-22 08:55:57
问题 I am unable to figure this out. I have added my keyhashes and all to the Facebook webpage but I am unable to figure out this error 11-12 19:51:27.744: D/HelloFacebook(5188): Error: com.facebook.FacebookException: Failed to get app name. 回答1: I found this exception when my Facebook app is in Sandbox Mode but logged in and try to post status by a user who not included in developer list. You may check your developer roles or disable the Sandbox Mode. 回答2: I faced this problem and got its

call finish() from static method

感情迁移 提交于 2019-12-22 03:35:15
问题 I am using the Facebook Android SDK and want to close my Activity after a user logs in and gets the user object. In practice I am storing parts of it but I want to close the activity regardless. // make request to the /me API Request.executeMeRequestAsync(session, new Request.GraphUserCallback() { // callback after Graph API response with user object @Override public void onCompleted(GraphUser user, Response response) { if (user != null) { finish(); // causes errors } } }); The IDE error

Facebook Sample Session Login Applicatiom not working when Native Facebook app installed

廉价感情. 提交于 2019-12-22 00:54:25
问题 If the phone already has facebook native application installed it go to that application after giving the user name and passowrd it start loading and show pop telling complete action using browser when click the browser it says web page not available. the web page at fbconnect://success#sucess_token=CAA.. might be temporarli down or it may have moved permenantly to a new web address. There is no callback called to the application. I have created the hash key properly my application SSO work