私は次のコーディングを行いました:
onCreate()の中に私は書いた:
Facebook fc = new Facebook("392736034134808");
AsyncFacebookRunner mAsuncRunner = new AsyncFacebookRunner(fc);
mAsuncRunner.request("/me/events",new EventRequestListener());
onCreate()の下にある私のEventReqestListnerクラスは次のようになります。
class EventRequestListener implements
com.facebook.android.AsyncFacebookRunner.RequestListener {
public void onComplete(final String response) throws JSONException{
System.out.println("in oncomplete of friend request listner ....");
String Name= "test";
String Location= "test";
String Description= "desc";
JSONObject event = new JSONObject();
Bundle bundle = new Bundle();
bundle.putString("method","events.create");
event.put("page_id",123454);
event.put("name",Name);
event.put("location",Location);
event.put("start_time", "2013-05-14T10:13:00");
event.put("end_time", "2013-05-15T10:20:00");
event.put("privacy_type", "OPEN");
bundle.putString("event_info",event.toString());
try {
fc.request("POST", bundle);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("Event Posted");
}
私の問題はこれです、私はエラー、例外を受け取りません。また、私はイベントを作成します。私はアンドロイドに非常に新しいです、あなたの助けは本当に価値があります。ありがとうございました!!