0
我正在製作一個應用程序,我想在其中瀏覽臉書的所有相冊。我爲它使用了以下教程。無法瀏覽Android中的臉書相冊
http://huguesjohnson.com/programming/java/android-fb-album/
但沒能獲得單一的數據。我收到來自Facebook服務器的空響應。
任何人都可以幫我獲取Facebook相冊及其照片嗎?
這是我的代碼。
public class getUserImages extends AsyncTask<Void, Void, Void>
{
@Override
protected Void doInBackground(Void... params)
{
try
{
//invoke the API to get albums
long startTime=System.currentTimeMillis();
RestClient client = new RestClient("https://graph.facebook.com/" + PreferenceData.getUserId(FacebookIntegrationActivity.this) + "/albums?access_token="+mFacebook.getAccessToken());
String albumsJson=client.execute(0);
long endTime=System.currentTimeMillis();
Log.d("==","Time to download albums="+(endTime-startTime)+"ms");
Log.d("==","Album Json="+albumsJson);
}
catch (Exception e)
{
e.printStackTrace();
}
return null;
}
}