facebook-android-sdk

why am I getting the error “error executing aapt ”

廉价感情. 提交于 2019-12-12 02:42:56
问题 I'm getting the error executing aapt :return code 1073741819 due to which .apk file is not generated how to fix this. How to fix if r.java file is missing 回答1: It could be a syntax or formatting error in one of the XML files. I just got this error code (it's actually negative), and I checked all the @string references and they were OK. Eventually I figured out it was because of this item in a menu XML file: <item android:id="@+id/action_stop" android:orderInCategory="100" android:icon="

Facebook Login Button with email responce

感情迁移 提交于 2019-12-12 01:48:18
问题 I had implemented the facebook button following the facebook guide.It's working perfectly but first_name, last_name, email, sex, fb_id. I got all the things except email .Might be I need to give some permission But I can't find it where to give it. MainActivity.class public class MainActivity extends FragmentActivity { private MainFragment mainFragment; private LoginButton loginBtn; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super

NPE getCount in Adapter when trying to get user albums using FB SDK

谁都会走 提交于 2019-12-11 20:13:17
问题 I am trying to get the users albums using the FB SDK. I have managed to log-in successfully and am able to retrieve the users profile picture and acquire an access token. I am following this answer here and am trying to get it to work, but I am running into an issue where I get java.lang.NullPointerException in the adapter class on at com.myapp.myapp.PhotosAdapter.getCount(PhotosAdapter.java:37) Here's the full set-up as to what I have: Where am I going wrong? thanks FBGRID activity: public

How do you use the method 'openWithImportedAccessToken' in the new Facebook SDK for Android 3.02

邮差的信 提交于 2019-12-11 18:44:10
问题 The new Facebook SDK for Android (3.0) has deprecated a lot of the old methods, including the setAccessToken method. The replacement for this (I think) is the method openWithImportedAccessToken https://developers.facebook.com/docs/reference/android/3.0/Session#openWithImportedAccessToken(String, Date, Date, AccessTokenSource, List, StatusCallback). Does anyone have any examples of using this? In particular how do you get the expiration time and last refresh time of the access token? 回答1: If

Facebook for android video upload - works with one app and not with another

烂漫一生 提交于 2019-12-11 17:33:16
问题 I have a weird problem when uploading a video to facebook... My code is based on this answer: Is uploading videos from an SD Card to Facebook possible with the Facebook SDK? It works perfectly with one facebook app, but not with another. I have 2 facebook apps that I own as an administrator. Both of them are set up with my debug key hash, and both of them have exactly the same settings. The ONLY thing I change in my code is the app ID (first app or second app). The behavior for both apps is:

Android post picture to Facebook public page wall

冷暖自知 提交于 2019-12-11 16:51:57
问题 I'm currently able to post to a public page wall using: JSONObject json = new JSONObject(); json.put("message", "I'm on your wall"); Request req = Request.newPostRequest(getSession(), "PowerCardSoftware/feed", GraphObject.Factory.create(json), new Callback() { @Override public void onCompleted(Response response) { if(response.getError() != null) Log.e("FRAGACTIVITY", response.getError().toString()); Toast.makeText(getBaseContext(), "I hacked your facebook!", Toast.LENGTH_SHORT).show(); } });

Unable to access facebook login?

冷暖自知 提交于 2019-12-11 15:47:10
问题 I am using Facebook's official Android SDK, and I am administrator of an app on Facebook. I read that by default, the app is in sandbox mode and no one except administrator and developers can access it. I am using it to add Facebook login facility in my android app. However, I added my friends, who are developing the app with me as developers, but they cant log in via Facebook with their account credentials from the app. I disabled the sandbox mode for app from Facebook's app settings, still

An issue with Facebook SDK for Android sample projects

*爱你&永不变心* 提交于 2019-12-11 11:07:33
问题 I imported Facebook SDK to Eclipse, along with some sample projects. I had red X on all of them, but I managed to fix. Now I still some red X's. When I look at java files of these projects, where there are errors (for example a line such as this: setContentView(R.layout.main); I see the following error: R cannot be resolved to a variable. When I look at the main.xml layout file, I see an error like that: Multiple annotations found at this line: - error: No resource identifier found for

Facebook SDK 3.5 : fetch user data example works in emulator but not in real device

丶灬走出姿态 提交于 2019-12-11 09:57:38
问题 I am trying to implement fetch user data example give on developers.facebook.com It works fine on Emulator and displayes data in logcat but when i try it in real device it doesn't open screen for login thats why it directly writes message to Logcat "Logged out"( I guess that means state is closed) following is the code private void onSessionStateChange(Session session, SessionState state, Exception exception) { if (state.isOpened()) { Log.i(TAG, "Logged in..."); userInfoTextView.setVisibility

Is there no way available for retrieving posts using a search query/keyword from facebook?

守給你的承諾、 提交于 2019-12-11 08:48:57
问题 I'm trying to use GraphAPI for retrieving various posts using a search query/keyword from Facebook. This is what I tried: new GraphRequest( AccessToken.getCurrentAccessToken(), "/search?q=solareclipse&type=post", null, HttpMethod.GET, new GraphRequest.Callback() { public void onCompleted(GraphResponse response) { /* handle the result */ } } ).executeAsync(); but I got this error: { "error": { "message": "(#11) This method is deprecated", "type": "OAuthException", "code": 11, "fbtrace_id":