How can I upload an image in facebook using facebook SDK in android
See the Feed dialog documentation here:
https://developers.facebook.com/docs/reference/dialogs/feed/
The "source" parameter only accepts URLs. If you want to upload an image, you should get the publish_actions permissions from the user, and use Request.newUploadPhotoRequest method.
Uploading to a album of a page on Facebook using Android sdk
- You need
manage_pages
andpublish_pages
- You need to use a Page Token of that Page
- Use the
/album/photos
endpoint to post a photo: https://developers.facebook.com/docs/graph-api/reference/v3.3/album/photos#publish
Additional information about the Graph API in general and login: https://developers.facebook.com/docs/graph-api/using-graph-api
Share text and Image together using Facebook SDK in Android
Hey this code might be helpful,
Bundle parameters = new Bundle();
parameters.putString("message", category_item_name_desc.getText().toString());
parameters.putString("picture", categoryItemsModel.getImageUrl());
parameters.putString("caption", txtDescription_desc.getText().toString());
facebook.request("/me/feed", parameters, "POST");
You can add text by adding paramater as "caption"
Share Image and Text to Facebook on android
Was able to do this my self with the current Facebook SDK (3.14.1 at the time) with no login and I made it into a share intent for adding to the chooser list.
I have a demo project at https://github.com/b099l3/FacebookImageShareIntent only dependency is the facebook sdk and it is contained in one activity.
Related Topics
Difference Between Activity and Fragmentactivity
Listing All Extras of an Intent
What Is the Role of Content_Main.Xml in Android Studio 1.4
Android Parcelable -- Retailerorderactivity.Java Return Null
The Signing Fingerprint You Specified Is Already Used by Another Android Oauth2 Client
Programmatically Change the Value of a Color Resource Obtained from API Response
What Does It Mean "No Launcher Activity Found!"
Dynamic Form with Repeating Form
Broadcastreceiver When Wifi or 3G Network State Changed
How to Rotate the Android Emulator Display
How to Implement Getfilter() with Custom Adapter That Extends Baseadapter
Why Do I Get Access Denied to Data Folder When Using Adb
Unicode Characters Not Displayed in Textview.Settext
How to Use the Firebase Server Timestamp to Generate Date Created
Support Fragmentpageradapter Holds Reference to Old Fragments