I am trying to integrate Facebook and Twitter in my Android app just to post some text information.
Facebook is almost working, user can log normally, but when I execute
mSocialNetworkManager.getFacebookSocialNetwork().requestPostMessage("Facebook test",
new OnPostingCompleteListener() {
@Override
public void onPostSuccessfully(int i) {
System.out.println("Facebook post success!");
}
@Override
public void onError(int i, String s, String s2, Object o) {
System.out.println("Facebook error: " + s2);
}
});
No onPostSuccessfully nor onError get called. Same thing with the demo app (it shows eternally the waiting dialog). Is it a recent change in Facebook API or something wrong with the lib?
On the other side, Twitter always returns an error when trying to SocialNetwork.REQUEST_LOGIN.
Error:
401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<error>Desktop applications only support the oauth_callback value 'oob'</error>
<request>/oauth/request_token</request>
</hash>
I think consumer key and secret are correctly set.
mSocialNetworkManager = SocialNetworkManager.Builder.from(getActivity())
.twitter(SocialNetworkConstants.TWITTER_API_KEY, SocialNetworkConstants.TWITTER_API_SECRET)
.facebook().build();
Image from API keys section
Do you know why do I get that error?
Thanks in advance.