0

I want to share a link in my application.I didnt find any api for sharing link in graph api.

What is the difference between sharing and posting in facebook?How can I perform sharing ?

Thanks in advance

1

1 Answer 1

0

You can post to wall on facebook using this code:

Bundle parameters = new Bundle();
parameters.putString("message","YOUR_MESSAGE");
parameters.putString("link", "ANY_LINK");
String response = facebook.request("me/feed", parameters,
                    "POST");

Also to upload an image, you can use this code:

Bundle parameters = new Bundle();
parameters.putString("message","YOUR_MESSAGE");
parameters.putString("caption","ANY_CAPTION");
parameters.putByteArray("picture", "IMAGE_LINK");
String response = facebook.request("me/photos", parameters,
                    "POST");

Hope it will help you.

2
  • what is the difference between sharing and posting Jan 3, 2013 at 13:27
  • If you put your own content then you can say posting. but in case of sharing, there can be a any link or other user's content. so if you post a link then you can also called it sharing a LINK. Jan 3, 2013 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.