PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, June 29, 2022

[FIXED] How to put text in "Say something about this..." facebook text box from android programatically

 June 29, 2022     android, facebook-sdk-4.0, facebook-sharer, hint, share     No comments   

Issue

I am sharing image on facebook from android app. I can view the image in facebook what I Shared. But, I need to write a text in "Say something" text box from android programatically. I dont no how i can achieve this via facebook SDK. I am using facebook SDK v4.

enter image description here


Solution

Facebook not allow to post text either using SDK or Intent.

from Facebook Docs

When you implement sharing, your app should not pre-fill any content to be shared. This is inconsistent with Facebook Platform Policy, see Facebook Platform Policy, 2.3.

  1. Don't prefill captions, comments, messages, or the user message parameter of posts with content a person or business didn’t create, even if the person can edit or remove the content before sharing. You may use our Share Dialogs to prefill a single hashtag in a post, but don't prefill any content a person or business didn't create via the API.

You can specify a single hashtag to appear with a shared photo, link, or video. This hashtag also appears in the Share dialog, and people have the the opportunity to remove it before publishing.

The following is an example of adding a hashtag to a link share.

ShareLinkContent content = new ShareLinkContent.Builder()
    .setContentUrl(Uri.parse("https://developers.facebook.com"))
    .setShareHashtag(new ShareHashtag.Builder()
            .setHashtag("#ConnectTheWorld")
            .build());
    .build();

Note: This(Hashtag) Additional Feature only available when you are using Facebook Share Dialog.

For more details, please refer https://developers.facebook.com/docs/sharing/android



Answered By - Gopal
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing