react-native-social-share icon indicating copy to clipboard operation
react-native-social-share copied to clipboard

Facebook Message not showing

Open chandrasekhar-nyros opened this issue 8 years ago • 3 comments
trafficstars

Hi,

I shared the content in facebook. But in facebook it shows ip address instead of actual message i shared. Please help me.

Thanks! in advance..

chandrasekhar-nyros avatar Aug 02 '17 09:08 chandrasekhar-nyros

Hi @chandrasekhar-nyros

Can you show what you did and which link you tried to share?

To be honest "react-native-social-share" has no power over what Facebook does with the shared content. It just uses the Facebook share method that is built into iOS.

doefler avatar Aug 02 '17 09:08 doefler

Hi @doefler

I am using local url present below is my code what i am sharing

GLOBAL.BASE_URL = "http://203.193.173.125/"

let shareOptions = { title: "Ride from "+this.props.pic.ride_id[0].start_location+" to "+this.props.pic.ride_id[0].end_location+" on "+this.props.pic.ride_id[0].start_date, message: "Ride from "+this.props.pic.ride_id[0].start_location+" to "+this.props.pic.ride_id[0].end_location+" on "+this.props.pic.ride_id[0].start_date, url: ''+GLOBAL.BASE_URL+''+this.props.pic.mapSnapshot, subject: "My Ride from "+this.props.pic.ride_id[0].start_location+" to "+this.props.pic.ride_id[0].end_location+" on "+this.props.pic.ride_id[0].start_date, // for email };

chandrasekhar-nyros avatar Aug 02 '17 09:08 chandrasekhar-nyros

Ok then it all makes sense 😄 The Facebook sharing API doesn't allow us to customize the text anymore. Instead, Facebook scrapes the linked page and looks for graph data to pull into the post. So all you need to do is to add graph data to each shared link. See this link for some info about it:

  • https://developers.facebook.com/docs/sharing/best-practices#tags
  • http://ogp.me/

doefler avatar Aug 02 '17 09:08 doefler