2012-10-26 3 views
2

나는 안드로이드를위한 FB의 API 3.0을 사용하고 있습니다에 번들 정보를 추가하고 세션에 대한 예에 따라 나는 이미지를 업로드Facebook API 3.0. - 이미지 업로드

Request request = Request.newUploadPhotoRequest(Session.getActiveSession(), image, new Request.Callback(); 

를 사용합니다. 이 이미지에 기본 텍스트를 추가해야하지만 넣을 위치를 파악할 수 없습니다.

params.putByteArray("picture", imgData); 
params.putString(Facebook.TOKEN, accessToken); 
params.putString("caption", MyGlobals.INSTANCE.activeSetting.f_name); 

newUploadPhotoRequest에 대한 요청에 텍스트를 추가하는 적절한 방법은 무엇입니까 : 전송 된 매개 변수의 번들 된 API에서

이 있었다?

tnx.

답변

7

당신은 요청을 생성하고 당신이 그것을 실행하기 전에, 다음을 수행 할 수 있습니다 후 :

// Get the current parameters for the request 
Bundle params = request.getParameters(); 
// Add the parameters you want, the caption in this case 
params.putString("name", "My Caption String"); 
// Update the request parameters 
request.setParameters(params); 

// Execute the request 
Request.executeBatchAsync(request); 
+0

예! 이것은 정확하게 묘사 된대로 작동합니다! Tnx C.Abernathy !! – Balkyto

1

우리가 이미지에 설명을 추가 할 수 없습니다 위의 솔루션.

해결책 : 키 message로 하였다 독특한 고유 한 것을 My caption String위한

params.putString("name", "My Caption String"); 

putString 첫번째 파라미터는 키

message 때문에 name로 대체.

관련 문제