FAQ Database Discussion Community


Facebook SDK 4.0 app invite android

android,facebook-sdk-4.0
I was using below code for app invitation. if (AppInviteDialog.canShow()) { AppInviteContent content = new AppInviteContent.Builder() .setApplinkUrl(appLinkUrl) .setPreviewImageUrl(previewImageUrl) .build(); AppInviteDialog.show(this, content); } every time i run code i got nothing. no error or no warning nothing I followed App invite link but get no result after facebook login screen. Any...

Facebook login fails (always isCancelled) after upgrading to SDK 4.1

ios,facebook,swift,facebook-sdk-4.0
I have upgraded Facebook SDK from 3.21.1 to 4.1 in an iOS app (already live). I followed carefully the upgrade guide, and implemented the new methods for login. The code I used is the one provided in Facebook documentation. But since the upgrade, each time I try to log in...

how to fetch profile picture from facebook

ios,swift,user-profile,facebook-sdk-4.0
I am trying to fetch the profile picture of the user. But as Facebook has update its API sdk to v4.0 or later, and also on the FB developers site, they are explaining in Objective C, but I want code in Swift. I am not getting how to use FBSDKProfilePicture...

Facebook PHP SDK 4.0 Login with Lumen

php,facebook,laravel,facebook-sdk-4.0,lumen
I writing a small application where I'm trying to get some Facebook information, but I can't manage to get the authentication to work. At first I've setup the AppServiceProvider with: FacebookSession::setDefaultApplication(static::APP_ID, static::APP_SECRET); Then In my view I just have a button which goes to the auth URL. The auth route...

android facebook sdk 4.1.2 eclipse error

android,eclipse,facebook,facebook-sdk-4.0
This is my error after I run App. After importing Facebook 4.1.2 project it says that I need Java 1.7, android support v4 and Bolts-Android so I updated my Android tools library from last version and it's showing an error. 05-18 19:05:06.591: E/AndroidRuntime(23525): FATAL EXCEPTION: main 05-18 19:05:06.591: E/AndroidRuntime(23525): java.lang.RuntimeException:...

How to handle Facebook Android SDK v4.1 Access Token between Activities

android,facebook-login,facebook-access-token,facebook-sdk-4.0
When i go to another activity after successfully logged a user in i can't access to the Facebook Access token AccessToken.getCurrentAccessToken() I got this in the LogCat: {AccessToken token:ACCESS_TOKEN_REMOVED permissions:[]} ...

ANDROID FACEBOOK SDK-4.0: I get an error when i use “/me?fields=age_range” in my GraphRequest.newGraphPathRequest

android,facebook,graph,android-facebook,facebook-sdk-4.0
I need to get the age_range from facebook. When i use /me?fields=age_range in my GraphRequest.newGraphPathRequest i get an error. The error is that graphObject returns null. I've tried using /me and it works i get the correct user data though when i use /me?fields=age_range i get this error. Testing﹕...

FacebookSDK on Android - SharePhotoContent with Message body

libgdx,facebook-android-sdk,android-sdk-tools,facebook-sdk-4.0,facebook-sdk-3.0
I have a button in my game where I make a finish level screen capture , I then attach that picture to a Facebook SharePhotoContent dialog from the newest SDK. It all works as it's supposed but how do I also insert a custom message body so that I replace...

Facebook FBSDKAppInviteContent - Missing App Link URL

ios,facebook,facebook-sdk-4.0
Do you need to have your own website with meta tags for your app link url to use the FBSDKAppInviteContent and FBSDKAppInviteDialog to invite friends?. If I put just the app link url there, It shows an error saying something like Missing App Link URL The app link used with...

“[[FBSDKAccessToken currentAccessToken] hasGranted:@”publish_actions“]” always return false

ios,objective-c,parse.com,facebook-sdk-4.0,facebook-permissions
I'm trying to validate if I have publish_actions permission. Always got false. Even when I request and get a publish_actions and get succeeded=TRUE, the re-validation still return false. Any idea? bool bGranted_publish_actions=[[FBSDKAccessToken currentAccessToken] hasGranted:@"publish_actions"]; bool bGranted_user_photos=[[FBSDKAccessToken currentAccessToken] hasGranted:@"user_photos"]; if (!bGranted_user_photos || !bGranted_publish_actions ){ [PFFacebookUtils linkUserInBackground:[PFUser currentUser]...

save info about facebook user to use in another Activity

android,facebook,facebook-sdk-4.0
I'm working on project to my university, and I would like to know how save some information about facebook user like name, e-mail and picture. Then how I can use this information in another Activity? As you can see my code i can show info in the same activity that...

Cannot Import Facebook SDK to Android Project

android,facebook-sdk-4.0
I have been trying to import Facebook SDK to my existing project. I tried the following instruction but didn't work. 1 : File > Import Module ..find facebook-android-sdk-4.0.1 then Finish 2 : Go to File > Project sturucture > dependecies tab > Module Dependencies select :Facebook 3 : SYNC project...

Retrieve data from JSON object uing Graph API in Android Studio

android,json,facebook-graph-api,android-activity,facebook-sdk-4.0
I want to just get the email of the user of my application. I have used Graph API. But I am facing problems in converting the received JSON object to a string and then retrieving the data from it. Here is a part of my code: new GraphRequest.GraphJSONObjectCallback() { @Override...

Android Facebook sdk 4.2 cannot get email

android,facebook-graph-api,facebook-sdk-4.0
I am using facebook sdk 4.2 for my android app. But I was unable to get the my email and it show no value for email. However, I can get other value such as name, link, id, gender. There are some topic about this from stackoverflow but they are using...

how to solve this Facebook SDK 4.0 login button exception

java,android,facebook,facebook-login,facebook-sdk-4.0
I am using Facebook SDK 4.0 in an android app for login, the code is as follows loginButton = (LoginButton)findViewById(R.id.login_button); loginButton.setReadPermissions("user_friends"); // Other app specific specialization callbackManager = CallbackManager.Factory.create(); // Callback registration loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(LoginResult loginResult) { // App code Profile profile = Profile.getCurrentProfile(); Log.d("facebook",profile.getId());...

FacebookCallback.onCancel is getting called when trying to login using facebook sdk

android,facebook,login,facebook-sdk-4.0
I have an Android app and I am trying to use facebook's sdk (version 4.1.0) to get a token and login. Here is my code: public class LoginActivity extends Activity { private CallbackManager callbackManager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); FacebookSdk.sdkInitialize(getApplicationContext()); callbackManager = CallbackManager.Factory.create(); LoginManager.getInstance().registerCallback(callbackManager, new...

Facebook android sdk needs java 1.7 to work?

java,android,eclipse,facebook,facebook-sdk-4.0
I've imported the Facebook android sdk (version 4.1.1) into my project and I've encountered some errors such as ArrayList<String> permissionsList = new ArrayList<>(); which throws an error that it needs java compiler 1.7 to work. Then when I change the java compiler of the project to 1.7 and it gives...

Facebook android app error : Invalid key hash

android,hash,facebook-sdk-4.0
I have imported the Facebook SDK to my android project, first time I logged in to Facebook from my android application it worked, but the second time I got this error : Invalid key hash. The key hash "..." does not match any stored key hashes. Configure your app key...

Facebook SDK invalid Hash Key

android,facebook,hash,facebook-sdk-4.0
I'm writing an android application with my friend. In the application we use Facebook SDK and a login button. We already setup the hash key using the code similar to what facebook suggests Code in the app profile in facebook. We also wrote the key under Settings -> Key Hashes....

How to update FBRequest.requestForMe() on facebooksdk v4.0.1?

ios,iphone,swift,facebook-sdk-4.0
So, I made application on iphone. I'm using login with facebook and currently upgrade my facebooksdk to lastest version. Some of my code happen to have an error. Below is mycode: let request = FBRequest.requestForMe() request.startWithCompletionHandler({ (connection, result, error) -> Void in if error == nil { if let userData...

error in login with facebook login

android,facebook,login,facebook-sdk-4.0
I'm trying to implement a login with facebook in my application. I have already imported the sdk and set all the right settings on my developer account on facebook. But now when I try to login with facebook it redirects me right back to the loginactivity instead of the mainactivity....

Unable to build after importing the Facebook Login kit

ios,objective-c,facebook-sdk-4.0
I am trying to implement the facebook login through my app. I have dragged a UIButton onto my storyboard and named its class as FBSDKLoginButton. [FBSDKLoginButton class]; When I try to put this line in my AppDelegate didFinishLaunchingWithOptions,it throws the following error when I try to build the app: ld:...

Laravel FB SDK v4 requesting w. recursion

php,laravel,queue,facebook-sdk-4.0
I am currently working with laravel and the php fb sdk v4 to gather posts from a page after having a user signup. Here is the flow of what I am attempting. push a job onto the queue. In that job request from fb the first 25 posts via a...

How to get user details using Facebook SDK v4.2 for android

android,facebook,facebook-sdk-4.0
I was able to implement the the facebook login using the code : public class MainActivity extends ActionBarActivity implements FacebookCallback<LoginResult> { //List<String> permissionNeeds=Arrays.asList("user_photos","friends_photos", "email", "user_birthday", "user_friends"); TextView t; String get_id, get_name, get_gender, get_email, get_birthday, get_locale, get_location; private CallbackManager mCallbackManager; private LoginButton mFbLoginButton; @Override public void onCreate(Bundle savedInstanceState) {...

Parse/PFNullability.h not found

swift,parse.com,facebook-sdk-4.0
Hi I'm trying to update Facebook SDK from 3.x to 4.0 by using Parse. It works if I don't use Facebook integration. But when I try to use Facebook,PFFacebookUtils.h generate error. That said "Parse/PFNullability.h not found" heppened. ParseFacebookUtilsV4/PFFacebookUtils.h file try to import 3 files from Parse.framework. #import <Parse/PFConstants.h> #import <Parse/PFNullability.h>...

Invite users with AppInviteDialog

android,facebook,facebook-sdk-4.0
I am glad that Facebook finally let users invite their friends with the SDK version 4 but I don't know how to do it. The documentation is clear at least for a while: if (appInviteDialog.canShow()) { AppInviteContent content = new AppInviteContent.Builder() .setApplinkUrl("https://play.google.com/store/apps/details?id=com.myapp.android") .setPreviewImageUrl("http://www.myapp.com/Images/stub.jpg") .build(); appInviteDialog.show(MainActivity.this, content); } So far this...

Facebook SDK v4 in Android Login with Mandatory Permissions

android,facebook-sdk-4.0
I want to login users with facebook sdk v4 in android. In my model facebook users can't login if they don't had enabled certain permissions. private static final List<String> FACEBOOK_PERMISSIONS = Arrays.asList("public_profile", "email"); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FacebookSdk.sdkInitialize(this.getApplicationContext()); callbackManager = CallbackManager.Factory.create(); loginButtonFacebook.setReadPermissions(FACEBOOK_PERMISSIONS);...

Android Facebook sdk override login button

android,eclipse,facebook,login,facebook-sdk-4.0
I have to create login in android application thorough facebook I make it through Facebook tutorial which is working perfectly with custom UI. ( i have customised Fb LoginButton in Xml) Now i want to put login button in first activity and logout button in another activity which will be...

Facebook Graph API limit for apprequests edge

facebook,facebook-sdk-4.0
Trying to get all the apprequests for a certain user, using the v2.2 open graph call: https://graph.facebook.com/v2.2/<facebookID>/apprequests?access_token=<accessToken>&format=json&limit=500&method=get Can't find in Facebook's documentation what's the upper bound for "limit", and I don't have that many apprequests to test that. I'm looking for the actual value at which Facebook caps the requests...

No friends can see what i shared on facebook (through android)

android,facebook,facebook-sdk-4.0,android-sharing
I created a music player. In the app, there is a feature where user can share what songs they are listening to. I STRICTLY followed this official guide from facebook's developer's page. Sharing is working fine. But none of my friends can see the shared posts. I have uploaded a...

Facebook SDK how to handle custom login in swift?

ios,facebook,swift,facebook-graph-api,facebook-sdk-4.0
I am implementing a Facebook login in my app and I just need to store the token for the session but without using the standard Facebook button... I managed to use: FBSDKLoginManager().logInWithPublishPermissions(["publish_actions"], handler: nil) which works exactly as expected... Now I am learning Swift and I have no knowledge of...

App invite dialog delegate methods result parameter contains no request id

ios,facebook,facebook-sdk-4.0
In fb-sdk 3.x. I was able to get request id after user has sent requests to their friends(usingFBWebDialogs) this way I could show in my app that user has invited friends which improved user experience because user got confirmation that invites were sent. Now with fb-sdk 4.0(using FBSDKAppInviteDialog) I don't...

Facebook server side oauth token

php,facebook,cron,facebook-sdk-4.0
I'm updating a cron script made with the previous version of the php sdk for facebook (3.2.2). They way it was implemented it was using a fixed access token. My question is, is there a way to generate it on the server without asking the user to login? (since this...

Login: after going to another activity app forgot Facebook picture, and name text

android,facebook,facebook-android-sdk,facebook-sdk-4.0
i have two issues i can't figure out using Facebook SDK inside my Android app. (SOLVED) After going to another activity, or re-open the app. It doesn't remember the profile picture, and the name(First, and Last name). If you choose to log out it still display your name, and picture....

how to share screenshot to Facebook

objective-c,facebook,facebook-sdk-4.0,social-media
I've already done that screenshot part, but still haven't found any solution to share the screenshot image to Facebook by using FBSDKSharePhoto. Facebook doesn't provide enough references for it. Can anyone please guide me here? Here is my screenshot code just in case: CGRect screenRect = [[UIScreen mainScreen] bounds]; UIGraphicsBeginImageContextWithOptions(screenRect.size,...