Hi. When I sign in a Twitter user no user data is stored on the user, and the email stored in the db is just a random number. Here is my code that runs without error. Version 3.0.3 of the SDK.
Map<String, String> twitterFieldsMappings = new HashMap<String, String>();
//twitter field first, my db field second
twitterFieldsMappings.put(“screen_name”, “name”);
twitterFieldsMappings.put(“profile_image_url”, “imageUrl”);
Backendless.UserService.loginWithTwitter(this, twitterFieldsMappings, new AsyncCallback<BackendlessUser>() { @Override
public void handleResponse(BackendlessUser backendlessUser) {
startActivity(new Intent(getBaseContext(), SplashActivity.class));
finish();
}
@Override
public void handleFault(BackendlessFault fault) {
showInfoDialog(getResources().getString(R.string.everbook_request_error), fault.getMessage());
}
I checked the internal system and the ticket appears as “Closed”, which means it has been fixed and will be available in the next update of the production environment (scheduled for next week).
I see that you have new version. I use version 3.0.8 for iOS. I updated yesterday. But I try use fieldMapping and nothing. Don’t work. My fields is empty. I have to get name of user and user_profile. Can you help me or fix this feature?
In the fieldsMapping map the Key is the name of the Twitter API field and Value is the name you want to save it in Backendless.
Try ([“screen_name” : “TheNameYouWantItToBeSavedInBackendless”])
You can contact https://dev.twitter.com/overview/api/users for information about other fields.
As you can notice, there’s not field as “email” in Twitter API, so fieldsMapping will not help to get it.
Hi Mark, I’ve updated the libraries. Now the user method “setProperties” is not available anymore. Why don’t you keep the compatibility between updates?
My problem is that when the app tries to redirect, first it says that “Safari cannot open the page because the address is invalid” and if I refresh the page, it opens a page saying “Could not approve social account”. What am I missing here?