facebook-android-sdk

How to give Facebook permission for accessing user data in facebook-sdk-3.0

白昼怎懂夜的黑 提交于 2019-12-04 18:15:46
I'm developing an application in which I'm using Facebook login for authentication and stuff. facebook sdk 3.0 needs some permission for accessing user data such as profile picture, emailID,publish_stram and etc. How to give permission in the code for accessing those things. Till now I'm able to get fb_access_token . Here is my code: Session.openActiveSession(this, true, new Session.StatusCallback() { // callback when session changes state @Override public void call(Session session, SessionState state, Exception exception) { if (session.isOpened()) { // make request to the /me API Request

How do I publish a check in to facebook with android SDK

橙三吉。 提交于 2019-12-04 16:44:15
The docs are terrible. I want to publish a users check in to facebook. According to the docs creating a checkin object is deprecated https://developers.facebook.com/docs/reference/api/checkin and instead you're supposed to add a post with location data attached. So that's what I'm trying to do. Or maybe i'm supposed to try to publish and open graph story? Anyways here's what I have, it's basically the code to publish a post that is in their SDK sample, the post is created but there is no location data attached. private void publishStory() { Session session = Session.getActiveSession(); if

Set Login/Logout Text for Button in Facebook Android SDK 4.0?

血红的双手。 提交于 2019-12-04 16:36:20
问题 My xml looks like this <com.facebook.login.widget.LoginButton xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/fb_login_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:paddingLeft="15dp" android:paddingRight="15dp" android:text="CONNECT WITH FACEBOOK" android:textColor="@color/white" android:textSize="20sp" android:textStyle="bold" android:background="@drawable/button_fb_login"/> and

Android facebook sdk 3.0 login by custom button

独自空忆成欢 提交于 2019-12-04 15:57:56
Android facebook sdk 3.0 login by custom button. I dont want to use fragment . Just click a button then facebook login fetch the user name ,email,uid and the access token. If facebook login in a dialog box there is no problem. 1- add facebook login activity in your AndroidManifest.xml <activity android:name="com.facebook.LoginActivity" android:screenOrientation="portrait"></activity> 2- on button click Intent i = new Intent(this,com.facebook.LoginActivity.class); startActivity(i); This will open facebook login activity. I recommend you this material about facebook Session: https://developers

Android app using Facebook login: An active access token must be used to query information about the current user

穿精又带淫゛_ 提交于 2019-12-04 13:55:35
I have integrated Facebook login in my app, but when trying to get the name out of the basic info of the logged in user, I get: { Response: responseCode: 400, graphObject: null, error: { HttpStatus: 400, errorCode: 2500, errorType: OAuthException, errorMessage: An active access token must be used to query information about the current user. }, isFromCache:false } I logged my session token and its expiration date and it is not null nor expired. I tried replacing session with getActiveSession() but that didn't fix anything. private void onSessionStateChange(Session session, SessionState state,

Can't relogin with Facebook credentials after logout

馋奶兔 提交于 2019-12-04 13:33:27
问题 I have an Android application that allow users to login with their Facebook credentials. Once they logout for the first time, they can't login again. After clearing the application's permission from the Applications page in user settings on Facebook's website, logging in works correctly. I use a LoginButton to login. Activities that need to be able to access the login information, extend this AuthActivity Activity. public class AuthActivity extends Activity { private AuthUtils authUtils;

Post an object of type Reference

笑着哭i 提交于 2019-12-04 13:00:33
I have had this problem for some time now and I have seen others have it as well. It has to deal with posting your custom objects that you create in Open Graph to post with your application. I am having this problem primarily on all platforms, but right now let's say I am using Android. If someone has accomplished this in C# or on IOS or even in PHP please post your answer. An Example: I have an object that posts a meal to Facebook. Let's say its properties are the following. mealName = "Lunch" mealType = "Vegetarian" mealLocation = "Somewheresville, OH" Now I have another object in my Open

news feed from facebook wall to a android app

て烟熏妆下的殇ゞ 提交于 2019-12-04 12:34:28
问题 There is any way to get the last post's made on a facebook wall into a Android app? I want to make some like a RSS reader to get some information on the app. To explain better- I have a page on facebook about one football club and there I post several information about news, games etc. Now I have made an android app and my question is whether I can import the post into the android application? 回答1: Of course, you can. First of all, if you are new to facebook integration- read the basics of

What is the code for getting a refreshed Facebook token in an Android app?

谁都会走 提交于 2019-12-04 11:19:26
问题 I am developing an Android app. With the impending deprecation of Facebook's offline_access permission I am trying to use the Graph API to extend the Facebook token. https://graph.facebook.com/oauth/access_token? client_id=APP_ID& client_secret=APP_SECRET& grant_type=fb_exchange_token& fb_exchange_token=EXISTING_ACCESS_TOKEN Can anyone provide detailed code that demonstrates how to implement the code above into an android app and obtain the refreshed Facebook token? Thank you for your time.

Login button facebook android doesn't redirect to new activity

橙三吉。 提交于 2019-12-04 10:50:08
When i run my Android app, and click approve to the give permissions it not get redirected to the MainActivity. The "Logged in" message doesn't shows up in the Catlog. I have read the Facebook developers guide, and compared my code to different topics here at Stack. I can't see i have done anything wrong. I would be very glad for help. public class Login extends Activity { /** * Called when the activity is first created. */ private CallbackManager callbackManager; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FacebookSdk.sdkInitialize