facebook-android-sdk

Android Facebook-sdf Exception: Failed to generate preview for user

自闭症网瘾萝莉.ら 提交于 2019-12-02 08:18:42
i'm developing a simple android app and i want post a status in facebook using OpenGraphObject and OpenGraphAction. if i use new FacebookDialog.ShareDialogBuilder(this) i have no problem, but when i'm using FacebookDialog.OpenGraphActionDialogBuilder i got the error: 01-09 15:56:29.594 11439-11439/simov.project2.yourcity E/Activity﹕ Error: com.facebook.FacebookException: Failed to generate preview for user. java public void test(int position){ File f = (File)mImageAdapter.getItem(position); Bitmap myBitmap= BitmapFactory.decodeFile(f.getAbsolutePath()); List<Bitmap> images = new ArrayList

Facebook API / Android : Wall Post publish with image attachment not working

别说谁变了你拦得住时间么 提交于 2019-12-02 07:53:18
I have the following code. It works and posts the message-part but the attachment part does'nt work. I suspect it has to do with passing a JSON as a string. Facebook returns "{"id":"23522646737635675"} . So its not an error. Bundle params = new Bundle(); params.putString("message", message); JSONObject attachment = new JSONObject(); attachment.put("href", URLEncoder.encode("http://a.espncdn.com/photo/2010/0523/pg2_a_cricket_576.jpg")); attachment.put("name", "Cricket Fantasy"); attachment.put("caption", "New team"); attachment.put("description","Description about Application"); JSONObject

How to allow user to post an Image on Wall using SDCard Folder

廉价感情. 提交于 2019-12-02 06:42:43
问题 I am allowing user to post a message on their [Friend & User] Wall along with single static image , and for that image i am using Web Image URL But now i wish to allow user to choose any single image from multiple images , like 10 images stored in a particular folder in SDCard , and then post to Wall . So here is my question, how to do that? My existing code to post static image on Wall , read below: @Override public void onClick(DialogInterface dialog, int which) { Bundle params = new Bundle

Explicitly Shared not working for post - Facebook Android SDK Open Graph Story

北慕城南 提交于 2019-12-02 06:14:10
I am currently using the Facebook Android SDK 3.19.1 to post an Open Graph Story to our user's timeline. The story is added to the user's activity log, but does not show up on their timeline. I have a custom action and object for my story, and I have set the "Explicitly Shared" option for my Action and the corresponding properties in code. I have also submitted and been approved for the "publish_actions" permission. Am I missing something here? private void postGraph(final Bundle b, final Request.Callback callback) { // Set up the request callback to handle errors Request.Callback

Android Facebook SDK 3.23.0 - FB Login on AndroidTV

可紊 提交于 2019-12-02 00:48:48
Does anyone have any experience using the Facebook SDK to perform Facebook login on AndroidTV? Since it's most often the case that an AndroidTV user won't have the actual Facebook app installed on the AndroidTV device, the Facebook SDK will open a WebView to allow the user to enter his Facebook credentials and login. The issue is the webview that gets displayed doesn't respond to d-pad actions and the fields to enter text don't indicate they are selected. Am I to assume that Facebook login for AndroidTV just isn't possible using the standard Facebook SDK functionality? Correct. Also, Facebook

Error while publishing photo on facebook wall using android facebook sdk

霸气de小男生 提交于 2019-12-02 00:41:45
问题 I am using official android Facebook sdk for publishing photo on wall but it crashes after sign in while allowing app permission to my account. I am using android 3.1 library for this app. following is the code which i am using to publish photo at wall, facebook.authorize(ImageCropShare.this, new String[] { "publish_stream" }, new DialogListener() { @Override public void onFacebookError(FacebookError e) { // TODO Auto-generated method stub } @Override public void onError(DialogError

How to revoke all Facebook permissions using Android SDK?

ぃ、小莉子 提交于 2019-12-01 23:16:00
问题 I'm having a problem revoking Facebook permissions using the Android SDK. There's a case in my app where I want to revoke all permissions. According to the Facebook documentation, you can use AsyncFacebookRunner to do this, and "if you don't specify a permission then this will de-authorize the application completely." I'm currently doing it like this: String method = "DELETE"; Bundle params = new Bundle(); params.putString("permission", ""); mAsyncRunner.request("/me/permissions", params,

Fackbook SDK throws Error

天大地大妈咪最大 提交于 2019-12-01 21:41:11
I have downloaded and imported android facebook sdk 3.14. It is throwing over 150 errors. e.g. AppLink cannot be resolved to a type AppLinkResolver cannot be resolved to a type Fragment cannot be resolved to a type etc. I have not even begun implementing the code yet. Can somebody help me out? These steps worked for me: Download the facebook sdk from here: https://developers.facebook.com/docs/android/ In Eclipse: Import -> Existing Projects into Workspace Go to the sdk folder location Deselect All and select only 'FacebooSDK' (this if you don't need any samples) After the project was imported,

Android Facebook SDK - Get user events

北城余情 提交于 2019-12-01 20:51:19
i've being able to login and get the user infos from the api with this code: Facebook facebook = new Facebook("XX"); AccessToken token = AccessToken.createFromExistingAccessToken("XX", new Date(facebook.getAccessExpires()), new Date(facebook.getLastAccessUpdate()), AccessTokenSource.FACEBOOK_APPLICATION_NATIVE, Arrays.asList(permissions)); Session.openActiveSessionWithAccessToken(getActivity(), token, callback); session = Session.getActiveSession(); Request.executeMeRequestAsync(session, new Request.GraphUserCallback() { @Override public void onCompleted(GraphUser user, Response response) {

Facebook authorize not working inside Android Asynctask or Thread

纵饮孤独 提交于 2019-12-01 20:18:00
问题 Working with facebook in Android. Sometimes my application is cashing in real time device when I tried to authorize Facebook in Android.not in emulator. I used the Android Facebook SDK. So I thought threading might stop that.First tried the asynctask Activity act=this; private class fbwork extends AsyncTask<Facebook, Integer, String> { @Override protected String doInBackground(Facebook... para) { // TODO Auto-generated method stub Log.d(tagg, "Entered async"); if(loginflag==0) { try { para[0]