post a photo to friend's wall on facebook with android - android

I am trying to post photo to my friend's wall.. I can do it as well but there is a problem. Anyone cant see it. I mean this photo shows only friend's wall.. not mine or not others friend.. I used some permissions but maybe I missed something..
private static final String[] PERMS = new String[] {"manage_pages", "read_insights", "user_checkins", "user_birthday","friends_birthday","email","user_photos","publish_checkins","publish_actions", "read_stream" ,"publish_stream","read_friendlists"};
and here is my codes..
public void postPhoto() {
String accessToken = mFacebook.getAccessToken();
params.putString("message", message);
params.putString("target_id", friendID);
params.putString(Facebook.TOKEN, accessToken);
response= mFacebook.request(friendID" + "/photos", params, "POST");
response = "{\"data\": [" + response + "] }";
String photoID = GetIDPhoto(response);
setTag(photoID, friendID);
}
private void setTag(String photoID,String friendID) {
String relativePath = photoID + "/tags/" + friendID;
Bundle params = new Bundle();
params.putString("x", "30");
params.putString("y", "30");
String response ="";
try {
response = mFacebook.request(relativePath, params, "POST");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Toast.makeText(getApplicationContext(), response, 3000).show();
}
Where is my mistake?

This seems to be your first problem, I haven't gone through the rest yet, I stopped at this:
response= mFacebook.request(friendID" + "/photos", params, "POST");
response = "{\"data\": [" + response + "] }";
Unless I'm mistaken, you seem to have some issues with your quotes.

Related

"HttpDeleteWithBody" isn't deleted from Database

I'm trying to call to my API sending a JSON to delete a product from my DB; however, it doesn't delete anything.
The response of the JSON is "true," and it doesn't give to me any error; even so, when I make a query on my DB, the product is still there.
I've created a class called HttpDeleteWithBody that looks like:
class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
public static final String METHOD_NAME = "DELETE";
public String getMethod() { return METHOD_NAME; }
public HttpDeleteWithBody(final String uri) {
super();
setURI(URI.create(uri));
}
public HttpDeleteWithBody(final URI uri) {
super();
setURI(uri);
}
public HttpDeleteWithBody() { super(); }
}
And then on my doInBackGround of my Fragment, I do this:
boolean resul = true;
try {
JSONObject usuari = new JSONObject();
try {
usuari.put("idProducte", params[0]);
usuari.put("idusuari", params[1]);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
HttpEntity entity = new StringEntity(usuari.toString());
HttpClient httpClient = new DefaultHttpClient();
HttpDeleteWithBody httpDeleteWithBody = new HttpDeleteWithBody(getResources().getString(R.string.IPAPI) + "produsuaris/produsuari");
httpDeleteWithBody.setEntity(entity);
HttpResponse response = httpClient.execute(httpDeleteWithBody);
Log.d("Response ---------->", response.getStatusLine().toString());
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} catch (Exception ex) {
Log.e("ServicioRest", "Error!", ex);
}
return resul;
Furthermore, I've tried to do this:
HttpDeleteWithBody delete = new HttpDeleteWithBody(getResources().getString(R.string.IPAPI) + "produsuaris/produsuari");
StringEntity se = new StringEntity(usuari.toString(), HTTP.UTF_8);
se.setContentType("application/json");
delete.setEntity(se);
however, it doesn't work... the log says:
D/Response ---------->﹕ HTTP/1.1 200 OK
This is how I call the method:
JSONObject deleteproduct = new JSONObject();
try {
deleteproduct.put("idProducte", String.valueOf(IDPROD));
deleteproduct.put("idusuari", String.valueOf(IDUSU));
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Log.i("Json test per afegir prod --> ", deleteproduct.toString());
TareaWSInsertar tarea = new TareaWSInsertar();
tarea.execute(String.valueOf(IDPROD), String.valueOf(IDUSU));
I've added on my Google Chrome a plug-in called "PostMan" and when I try to do this by this way, it's deleting correctly...
What I'm doing wrong?
EDIT
I tried to use cURL, and this is the result:
It is returning me false, when I put the same JSON as PostMan; nevertheless, if I put the same JSON on PostMan, it works fine.
EDIT 2
I implemented ion library and I did it like :
JSONObject usuari = new JSONObject();
try {
usuari.put("idProducte", params[0]);
usuari.put("idusuari", params[1]);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
String url = getResources().getString(R.string.IPAPI) + "produsuaris/produsuari";
Log.d("CURL", "curl -X DELETE -d '" + usuari.toString() + "' " + url);
Builders.Any.F builder = Ion.with(getActivity().getApplicationContext())
.load(HttpDelete.METHOD_NAME, url)
.setTimeout(15000).setStringBody(usuari.toString());
String response = builder.toString();
Log.d("TEST", "Req response -->" + response);
}
catch (Exception ex){
resul = false;
}
And it still returning that it's OK, and don't delete anything.
This appears to be a server side issue, to be sure of this, do the following:
1) Add Ion as an dependency in your grandle.
compile 'com.koushikdutta.ion:ion:+'
2) Use the following snippen to perform your request:
JSONObject jsonObject = new JSONObject();
try{
for(BasicNameValuePair aNameValue : getParameters()){
jsonObject.put(aNameValue.getName(), aNameValue.getValue());
Log.d("TEST","parameter "+aNameValue.getName()+": "+aNameValue.getValue());
}
jsonObject.put("time_zone", Util.timeZone());
Log.d("TEST","parameter time_zone:"+Util.timeZone());
}catch(Exception e){
//
}
Log.d("CURL", "curl -X DELETE -d '"+jsonObject.toString()+"' "+getUrl());
Builders.Any.F builder = Ion.with(getContext())
.load(HttpDelete.METHOD_NAME, getUrl())
.setTimeout(BuildConfig.HttpClientMaxTimeout).setStringBody(jsonObject.toString());
String response = builder.asString().get();
Util.checkThreadUiException();
Log.d("TEST","-->"+ response);
There's no much rocket science, this is the code that I used in an app, in that method I received the parameters to send as a json, as a BasicNameValuePair collection. You can change that and directly set your json. I'm 100% porcent sure that this request will fail, because this is a server side issue.
UPDATE
JSONObject usuari = new JSONObject();
try {
usuari.put("idProducte", params[0]);
usuari.put("idusuari", params[1]);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String url = getResources().getString(R.string.IPAPI) + "produsuaris/produsuari";
Log.d("CURL", "curl -X DELETE -d '"+usuari.toString()+"' "+url);
Builders.Any.F builder = Ion.with(getContext())
.load(HttpDelete.METHOD_NAME, url)
.setTimeout(BuildConfig.HttpClientMaxTimeout).setStringBody(usuari.toString());
String response = builder.asString().get();
Log.d("TEST","Req response -->"+ response)
UPDATE
Try this, perform this request through curl and let me know the result:
curl --http1.0 -X DELETE -d '{"idusuari":121,"idProducte":15}' 192.168.1.46/ServicioWebRest/api/produsuaris/produsuari
Doing this you're telling to curl to send the request through http 1.0, chunked responses are only supported by http 1.1, if there's an error in the chunk encoding, this should tell you.
Also take a look to this issue that I submitted to Ion long ago. I think that the problem that I was having that time, and your current problem are alike, maybe some of the tips there will help. Specially the part about the addHeader("Connection", "close").
Would look like this:
Builders.Any.F builder = Ion.with(getContext())
.addHeader("Connection", "close")
.load(HttpDelete.METHOD_NAME, getUrl())
.setTimeout(BuildConfig.HttpClientMaxTimeout).setStringBody(jsonObject.toString());
Finally I solved the problem, what I've done is change the HttpDelete method on my API, and instead of send a JSON, I send parameters (like a HttpGet) and now my code is like :
boolean resul = true;
HttpClient httpClient = new DefaultHttpClient();
String id____USER = params[0];
String id____PROD = params[1];
HttpDelete del =
new HttpDelete(getResources().getString(R.string.IPAPI) + "produsuaris/produsuari?idProd=" + Integer.parseInt(id____PROD)+"&idUs="+Integer.parseInt(id____USER));
del.setHeader("content-type", "application/json");
try
{
HttpResponse resp = httpClient.execute(del);
String respStr = EntityUtils.toString(resp.getEntity());
if(!respStr.equals("true"))
resul = false;
}
catch(Exception ex)
{
Log.e("ServicioRest","Error!", ex);
resul = false;
}
return resul;
This is how I call this AsyncMethod
TareaWSInsertar tarea = new TareaWSInsertar();
tarea.execute(String.valueOf(IDUSU),String.valueOf(IDPROD));
This work to me, I know it's not the best solution, but I've no much time, also I tried three solutions and noone didn't work.
Feel free to post a correct answer if you know what I was doing wrong.

Cannot access Google Task API 403 Forbidden Response

I'm trying to connect to Google tasks without using Google client libraries. The following code returns a 403 forbidden error. Just not sure what I'm missing. Any guidance would be appreciated.
try {
Bundle options = new Bundle();
AccountManager manager = (AccountManager) getSystemService(ACCOUNT_SERVICE);
Account[] list = manager.getAccountsByType("com.google");
Account acct = list[0];
manager.invalidateAuthToken("com.google", null);
AccountManagerFuture<Bundle> acc = manager.getAuthToken(
acct,
"oauth2:https://www.googleapis.com/auth/tasks",
options, true, null, null);
Bundle bundle = acc.getResult();
String token = bundle
.getString(AccountManager.KEY_AUTHTOKEN);
Log.i("Token: ", token); // token does have value
String url = "https://www.googleapis.com/tasks/v1/users/#me/lists?key=long_winded_api_key_from_console_here";
HttpGet getRequest = new HttpGet(url);
getRequest.addHeader("client_id",
"clientID_from_console_here.apps.googleusercontent.com");
getRequest.addHeader("Authorization", "OAuth " + token);
HttpClient httpclient = new DefaultHttpClient();
String responseBody = httpclient.execute(getRequest,
new BasicResponseHandler()); // exception raised here
httpclient.execute(getRequest, new BasicResponseHandler());
Log.i("###", responseBody); // cannot get the response here
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} // exception raised here
catch (OperationCanceledException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (AuthenticatorException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
The following link shows how to get started using the Google Drive API from Android. It lets the user pick an account, gets consent from them then acquires a credentials object that can be used for API access with the Google client libraries:
https://developers.google.com/drive/quickstart-android
In your case you are trying to use the Tasks API, however the authentication parts should be identical:
In Step 2, enable the Tasks API instead.
Step 4 shows how to get an access token for a particular scope:
credential = GoogleAccountCredential.usingOAuth2(this, DriveScopes.DRIVE);
startActivityForResult(credential.newChooseAccountIntent(), REQUEST_ACCOUNT_PICKER);
Change the scope to the task API scope: https://www.googleapis.com/auth/tasks
Then I would recommend using the Google client libraries for the rest like the Drive example.
If for any reason you don't want to use the client libraries, and prefer crafting the HTTP request yourself, the authorization header you want should look like the following (unable to test right now):
getRequest.addHeader("Authorization", "Bearer " + credential.getToken());
I'm not perfectly sure if this is the cause, since you seem to do the same steps
I do, but you might want to try to use "Manage your tasks" instead of
"oauth2:https://www.googleapis.com/auth/tasks". That might be the reason for
the 403.
Here is how I connect without client libraries.
Full source available here:
apiTalker
First I get the access token:
public static final String AUTH_TOKEN_TYPE = "Manage your tasks";
public static String getAuthToken(AccountManager accountManager,
Account account, String authTokenType, boolean notifyAuthFailure) {
Log.d(TAG, "getAuthToken");
String authToken = "";
try {
// Might be invalid in the cache
authToken = accountManager.blockingGetAuthToken(account,
authTokenType, notifyAuthFailure);
accountManager.invalidateAuthToken("com.google", authToken);
authToken = accountManager.blockingGetAuthToken(account,
authTokenType, notifyAuthFailure);
}
catch (OperationCanceledException e) {
}
catch (AuthenticatorException e) {
}
catch (IOException e) {
}
return authToken;
}
Connecting and listing the available tasklists:
public static final String BASE_URL = "https://www.googleapis.com/tasks/v1/users/#me/lists";
public static String AuthUrlEnd() {
return "key=" + Config.GTASKS_API_KEY;
}
public static String AllLists(final String pageToken) {
String result = BASE_URL + "?";
if (pageToken != null && !pageToken.isEmpty()) {
result += "pageToken=" + pageToken + "&";
}
result += AuthUrlEnd();
return result;
}
public String getListOfLists(ArrayList<GoogleTaskList> list)
throws ClientProtocolException, IOException, JSONException {
String eTag = "";
String pageToken = null;
do {
HttpGet httpget = new HttpGet(AllLists(pageToken));
httpget.setHeader("Authorization", "OAuth " + authToken);
// Log.d(TAG, "request: " + AllLists());
AndroidHttpClient.modifyRequestToAcceptGzipResponse(httpget);
try {
JSONObject jsonResponse = (JSONObject) new JSONTokener(
parseResponse(client.execute(httpget))).nextValue();
// Log.d(TAG, jsonResponse.toString());
if (jsonResponse.isNull(NEXTPAGETOKEN)) {
pageToken = null;
}
else {
pageToken = jsonResponse.getString(NEXTPAGETOKEN);
}
// No lists
if (jsonResponse.isNull("items")) {
break;
}
eTag += jsonResponse.getString("etag");
JSONArray lists = jsonResponse.getJSONArray("items");
int size = lists.length();
int i;
// Lists will not carry etags, must fetch them individually if
// that
// is desired
for (i = 0; i < size; i++) {
JSONObject jsonList = lists.getJSONObject(i);
//Log.d("nononsenseapps", jsonList.toString(2));
list.add(new GoogleTaskList(jsonList, accountName));
}
}
catch (PreconditionException e) {
// // Can not happen in this case since we don't have any etag!
// } catch (NotModifiedException e) {
// // Can not happen in this case since we don't have any etag!
// }
}
} while (pageToken != null);
return eTag;
}
Here is how I parse the response:
public static String parseResponse(HttpResponse response)
throws ClientProtocolException, PreconditionException {
String page = "";
BufferedReader in = null;
Log.d(TAG, "HTTP Response Code: "
+ response.getStatusLine().getStatusCode());
if (response.getStatusLine().getStatusCode() == 403) {
// Invalid authtoken
throw new ClientProtocolException("Status: 403, Invalid authcode");
}
else if (response.getStatusLine().getStatusCode() == 412) { //
/*
* Precondition failed. Object has been modified on server, can't do
* update
*/
throw new PreconditionException(
"Etags don't match, can not perform update. Resolve the conflict then update without etag");
}
/*
* else if (response.getStatusLine().getStatusCode() == 304) { throw new
* NotModifiedException(); }
*/
else if (response.getStatusLine().getStatusCode() == 400) {
// Warning: can happen for a legitimate case
// This happens if you try to delete the default list.
// Resolv it by considering the delete successful. List will still
// exist on server, but all tasks will be deleted from it.
// A successful delete returns an empty response.
// Make a log entry about it anyway though
Log.d(TAG,
"Response was 400. Either we deleted the default list in app or did something really bad");
throw new PreconditionException(
"Tried to delete default list, undelete it");
}
else if (response.getStatusLine().getStatusCode() == 204) {
// Successful delete of a tasklist. return empty string as that is
// expected from delete
Log.d(TAG, "Response was 204: Successful delete");
return "";
}
else {
try {
if (response.getEntity() != null) {
// Only call getContent ONCE
InputStream content = AndroidHttpClient
.getUngzippedContent(response.getEntity());
if (content != null) {
in = new BufferedReader(new InputStreamReader(content));
StringBuffer sb = new StringBuffer("");
String line = "";
String NL = System.getProperty("line.separator");
while ((line = in.readLine()) != null) {
sb.append(line + NL);
}
in.close();
page = sb.toString();
//
// System.out.println(page);
}
}
}
catch (IOException e) {
}
finally {
if (in != null) {
try {
in.close();
}
catch (IOException e) {
e.printStackTrace();
}
}
}
}
return page;
}

How to post on Facebook page's wall in Android?

Hi I want to post any message or link to an Facebook page.What I have tried is this.
void postInfo()
{
try
{
Bundle parameters = new Bundle();
parameters.putString("message", messageFacebook);
parameters.putString("name", "Test Name");
parameters.putString("link", "http://www.mylink.com/");
parameters.putString("picture", imageUrl);
parameters.putString("display", "page");
String responsePost = facebook.request("me/feed", parameters, "POST");
String responsePagePost = facebook.request(FACEBOOK_PAGE_ID+"/feed", parameters, "POST");
Log.i(TAG, "responsePost = " + responsePost);
Log.i(TAG, "responsePagePost = " + responsePagePost);
} catch (MalformedURLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
What I am doing is I am posting a link to user's wall & also to my app's Facebook page.
This code works fine but problem is on Facebook page.The link which I post on Facebook page doesn't appear on page's wall but it appears on page's timeline in a box titled "Recent Posts by Others on MyApp Page".
I want the post should appear on wall rather than timeline.
What should I do I am not getting please help.
Facebook has changed all it's profiles to timelines now. Any facebook page will show posts by others as "Recent Posts by Others on MyApp Page". This behavior is controlled by facebook and not by your app. There is nothing you can do in this case.
Try this :
void postInfo()
{
try
{
Bundle parameters = new Bundle();
parameters.putString("message", messageFacebook);
parameters.putString("name", "Test Name");
parameters.putString("link", "http://www.mylink.com/");
parameters.putString("picture", imageUrl);
parameters.putString("display", "page");
facebook.dialog(this, "stream.publish", params,
new DialogListener() {
public void onFacebookError(FacebookError e) {
e.printStackTrace();
}
public void onError(DialogError e) {
// TODO Auto-generated method stub
e.printStackTrace();
}
public void onComplete(Bundle values) {
}
public void onCancel() {
}
});
} catch (MalformedURLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}

How to query specific data from Facebook on Android integration?

I have integrated Facebook to my Android application.Now I want to fetch the information like specific posts which are only made by my application.
How can I do this ? Please help.
Edited.
In my application a user can post message to his wall.What I want is if user's friends also uses same application and post messages through the application.
So I want to retrieve all those messages of user from his wall which are made through the application(By him and his friends).
OK I have solved problem my own.
I have used fql for retrieving information I needed.
This is how I have used fql.
For retrieving messages & other data from my wall (only those which are made through my application).
private String getWallInfo()
{
try
{
Bundle params = new Bundle();
params.putString("method", "fql.query");
params.putString("query", "SELECT post_id, actor_id, app_id, message FROM stream where source_id = me() and app_id = "
+ ConnectData.APP_ID);
String response = facebook.request(params);
Log.i(TAG, "response = " + response);
return response;
} catch (MalformedURLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
return null;
} catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
For retrieving messages & other data from my friends wall (only those which are made through my application).
private String getFriendsWallInfo()
{
try
{
Bundle params = new Bundle();
params.putString("method", "fql.query");
params.putString("query",
"SELECT post_id, actor_id, app_id, message FROM stream WHERE source_id IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND app_id="
+ ConnectData.APP_ID);
String response = facebook.request(params);
Log.i(TAG, "response = " + response);
return response;
} catch (MalformedURLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
return null;
} catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}

me/feed not posting to facebook wall

My facebook wall posting AND checkins were working until last week... Now they have stopped working. it is really strange... I am not sure what is causing it.
I can login to facebook fine. That is proven because I can receive my facebook profile picture.
At the top of the class extending activity I have specified these fields:
private static final String APP_ID = "286529654765268";
private static final String[] PERMISSIONS = {"publish_stream", "publish_actions", "publish_checkins", "create_event"};
private static final String TOKEN = "access_token";
private static final String EXPIRES = "expires_in";
private static final String KEY = "facebook-credentials";
private Facebook facebook = new Facebook(APP_ID);
I use the facebook object throughout my class.
This is how I post a message:
defaultMessage = edittext.getText().toString();
String response = null;
try{
SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences("settings", 0);
String imageUrl = "www.somesite.com/somejpg.jpg";
Bundle params = new Bundle();
params.putString(Facebook.TOKEN, facebook.getAccessToken());
params.putString("caption", defaultMessage);
params.putString("description", "a description");
params.putString("picture", imageUrl);
params.putString("name", "A Name");
//
response = facebook.request("me/feed", params, "POST");
facebook.request("me/feed", params, "POST");
} catch(Exception e){
e.getStackTrace();
}
if(response != "false" || response != null){
Toast.makeText(getApplicationContext(), "Status Updated Successfully!", Toast.LENGTH_LONG).show();
Log.e("facebook response", response);
}
I authorize onCreate. Here is where I do it:
public void facebookAuthorize(){
facebook.authorize(this, PERMISSIONS, Facebook.FORCE_DIALOG_AUTH, new DialogListener() {
#Override
public void onComplete(Bundle values) {
String me = null;
String id = null;
try {
me = facebook.request("me");
} catch (MalformedURLException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
} catch (IOException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
}
JSONObject json_id = null;
try {
json_id = new JSONObject(me);
} catch (org.json.JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
id = json_id.getString("id");
} catch (org.json.JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Log.e("Id", id);
URL img_value = null;
try {
img_value = new URL("http://graph.facebook.com/"+id+"/picture?type=large");
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Bitmap mIcon1 = null;
try {
mIcon1 = BitmapFactory.decodeStream(img_value.openConnection().getInputStream());
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
if(mIcon1 != null){
badge.setImageBitmap(mIcon1);
}
Toast.makeText(getApplicationContext(), "Successfully logged in!", Toast.LENGTH_LONG).show();
}
#Override
public void onFacebookError(FacebookError error) {}
#Override
public void onCancel() {}
#Override
public void onError(com.facebook.android.DialogError e) {
// TODO Auto-generated method stub
}
});
if(restore(facebook, getApplicationContext())){
//authorize the user.
facebook.authorize(this, PERMISSIONS, Facebook.FORCE_DIALOG_AUTH, new DialogListener() {
#Override
public void onComplete(Bundle values) {
Toast.makeText(getApplicationContext(), "Successfully Logged In to facebook!", Toast.LENGTH_LONG).show();
}
#Override
public void onCancel() {}
#Override
public void onFacebookError(com.facebook.android.FacebookError e) {
e.printStackTrace();
if(facebook.isSessionValid()){
Toast.makeText(getApplicationContext(), "Successfully Logged in to Facebook!", Toast.LENGTH_LONG).show();
// download the users avatar
}
else{
Log.e("FACEBOOK FAIL", "Facebook has epicly failed with an error in onCreate in Social Sharing or you are logged in already");
}
}
#Override
public void onError(com.facebook.android.DialogError e) {
// TODO Auto-generated method stub
}
});
} else { save(facebook, getApplicationContext()); }
}
I do not get an error. It appears to work but does not appear on my wall.
I get a facebook response with a post id too... The application is not blocked from posting on my profile.
Im at my wits end trying to figure out the issue. Any help would be great!.
I get a facebook response with a post id too...
What response do you get if you try to look up your post via that id?
If you can see your post this way, then it’s just not displayed on your wall (for reasons such as hiding/deleting previous posts, negative app feedback, …)

Categories

Resources