我正在开发一个应用程序,它能够使用 socialauth 库在linkedin、facebook 和 twitter 上共享内容。它适用于 facebook,但无法与 twitter 和linkedin 共享。我收到一条警告,下面的“Provider Not Supported”是正在使用的代码
socialauthadapter.authorize(this, Provider.TWITTER);
......
private final class ResponseListener implements DialogListener {
public void onComplete(Bundle values) {
try {
socialauthadapter
.updateStory(
headtv.getText().toString().trim(),
"Africa Progress Panel",
"Download APP .",
"This year's report calls on African leaders to tackle inequality and demands global community tackle. Let your voice be heard. Download APP",
"http://africaprogresspanel.org",
Global.SERVER_MAIN_URI
+ "uploads/pictures/reports/subtopics/"
+ subtopic_photo,
new MessageListener());
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override
public void onBack() {
// TODO Auto-generated method stub
}
@Override
public void onCancel() {
// TODO Auto-generated method stub
}
@Override
public void onError(SocialAuthError arg0) {
// TODO Auto-generated method stub
}
}
// To get status of message after authentication
public class MessageListener implements SocialAuthListener<Integer> {
@Override
public void onError(SocialAuthError arg0) {
// TODO Auto-generated method stub
}
@Override
public void onExecute(String arg0, Integer t) {
Integer status = t;
if (status.intValue() == 200 || status.intValue() == 201 ||status.intValue() == 204)
Toast.makeText(ReportDetails.this, "Message posted",Toast.LENGTH_LONG).show();
}
}
在 logcat 中,这就是我所看到的
Provider Not Supported
我该怎么做
NOTE:
- 所有密钥都是正确的