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

Wednesday, June 29, 2022

[FIXED] How can I share or add a place or Check-in using Facebook SDK 4.0?

 June 29, 2022     android, facebook-sdk-4.0     No comments   

Issue

I have been exploring the Facebook documentations but still yet to find on how to Check-in or share place. Most answers were already deprecated and I need to implement using the updated Facebook SDK. Did I miss something in the Documentations? Or do I have to use third party applications??? Besides the primary way of Sharing using the SDK, I also know how to use ACTION_SEND on sharing media content on facebook, is it possible to insert a place parameter there?


Solution

If you are using facebook share button it'll be like this

ShareContent sharecontent = new ShareLinkContent.Builder()
            .setPlaceId("141887372509674")
            .build();

    btnfacebookshare.setShareContent(sharecontent);

Put a placeID on ShareContents

There are also ShareContent subclasses you may use with setPlaceId() like SharePhotoContent, ShareVideoContent, and ShareOpenGraphContent.

It is not clearly stated on the documentations (https://developers.facebook.com/docs/reference/android/current/class/ShareLinkContent/) but with experimentations I came up with it



Answered By - Camelyn Fajardo
Answer Checked By - Candace Johnson (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