0

Is it possible to publish post to user's wall with " - feeling excited, reading, watching", etc using facebook android SDK? I search in the documentations but didn't find any way to do that.

I am posting the status this way:

mFacebookCallback = new FacebookCallback<LoginResult>() {
        @Override
        public void onSuccess(LoginResult loginResult) {
            Toast.makeText(mContext, "in LoginResult on success", Toast.LENGTH_LONG).show();
            /* make the photo share call */
            Bundle postParams = new Bundle();
            postParams.putString("name", "test data");
            new GraphRequest( AccessToken.getCurrentAccessToken(),
                  "/me/photos",  //photos
                  postParams,
                  HttpMethod.POST,
                  new GraphRequest.Callback() {
                  public void onCompleted(GraphResponse response) {
                     Toast.makeText(getApplicationContext(), "Successfully share post", Toast.LENGTH_SHORT).show();
                      }
                    }
            ).executeAsync();
      }
};

Does anybody know of a way?

Savad KP
  • 1,625
  • 3
  • 28
  • 40
Rezaul Karim
  • 1,311
  • 1
  • 18
  • 26

1 Answers1

1

Finally i have found a solution .There's no API for the emotions. But I found a very useful Emoticon Keyboard. This keyboard is not using Unicode sequences but rather just local image assets. Using Supported Unicode Sequences as well as the Visual Unicode Database we can set Unicode representation of enter image description here, is '\ud83d\ude03' and this code can be added to our post status like :

EditText messageInput = (EditText) findViewById(R.id.input);
messageInput.getText().append("\ud83d\ude03");

So I can add emotion to my facebook post as like:

Bundle postParams = new Bundle();
postParams.putString("message", shareEditText.getText().append("\ud83d\ude01").toString());

this stackoverflow link is helpful.

Community
  • 1
  • 1
Rezaul Karim
  • 1,311
  • 1
  • 18
  • 26