Share API in json

saveinfo api is to store the json string and get a shorten URL:

POST method:

URL: http://d.2ya.it/dre/api/rest/saveinfo?

Set parameters:

  • appId={AppID}
  • info={json content}
  • senderjid=-100001234567@chat.facebook.com (optional)
  • sendername=Russell William (optional)
  • recipientjid=-100007654321@chat.facebook.com (optional)
  • recipientname=Diana Banks (optional)

The result of the above call is a shorten URL:

Client user will call the above link to get the info string, by setting the httpHeader ‘Accept’ to ‘application/json’:


Share a Movie

I shared some Movies. Please click on the link below to check it out.

http://d.2ya.it/818fc34b-63f6-409a-af7f-b65ff2917cd8
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "imageURL" : "http:\/\/d.2ya.it\/images\/movie\/128718h5.jpg",
      "runningTime" : 91,
      "cast" : [
        "Jane Levy",
        "Shiloh Fernandez",
        "Jessica Lucas",
        "Lou Taylor Pucci",
        "Elizabeth Blackmore"
      ],
      "hasTrailer" : true,
      "rating" : "R",
      "movieId" : "128718",
      "numStars" : 3,
      "title" : "Evil Dead"
    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Movies"
}

Share a Photo

I shared some Media. Please click on the link below to check it out.

http://d.2ya.it/74e19462-a30f-46ce-8fd3-c425f2ca2169
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "url" : "https:\/\/s3.amazonaws.com\/KlakerFiles\/image-65b932f3-f013-4927-a791-a3f2200598d0.jpg",
      "type" : "image",
      "thumbnailurl" : "https:\/\/s3.amazonaws.com\/KlakerFiles\/image-65b932f3-f013-4927-a791-a3f2200598d0_small.jpg"
    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Media"
}

Share a YouTube video

I shared some YouTube. Please click on the link below to check it out.

http://d.2ya.it/cc41614f-1cfd-4f0e-920d-b965189951e3
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "title" : "Puppies vs Cat",
      "viewCount" : 246743,
      "videoId" : "guFf8zveF0M",
      "duration" : 40,
      "authorName" : "mihaifrancu",
      "image" : "http:\/\/i.ytimg.com\/vi\/guFf8zveF0M\/default.jpg"
    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "YouTube"
}

Share a restaurant

I shared some Restaurants. Please click on the link below to check it out.

http://d.2ya.it/9b3ddc07-5457-452d-b668-42f491801972
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "resId" : "1014021",
      "type" : "restaurant",
      "address" : "7235 Keele Street, Vaughan, ON, Canada",
      "stars" : "0.000000",
      "distance" : "0.23",
      "titleImageURL" : "http:\/\/maps.gstatic.com\/mapfiles\/place_api\/icons\/restaurant-71.png",
      "lat" : "43.795972",
      "lng" : "-79.498122",
      "title" : "Wendy's"
    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Restaurants"
}

Share a bar

I shared some Bars & Clubs. Please click on the link below to check it out.

http://d.2ya.it/9985782b-7094-4324-b8e2-26e15a518413
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "resId" : "1014046",
      "type" : "bar",
      "address" : "120 Interchange Way, Concord, ON, Canada",
      "stars" : "0.000000",
      "distance" : "2.67",
      "titleImageURL" : "http:\/\/maps.gstatic.com\/mapfiles\/place_api\/icons\/bar-71.png",
      "lat" : "43.789162",
      "lng" : "-79.52692",
      "title" : "Dave & Buster's"
    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Bars & Clubs"
}

Share a cafe

I shared some Cafes. Please click on the link below to check it out.

http://d.2ya.it/8fe73361-b663-4ab0-9366-d15cbf20ea49
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "resId" : "1014059",
      "type" : "cafe",
      "address" : "2081 Steeles W, Toronto, ON, Canada",
      "stars" : "0.000000",
      "distance" : "2.02",
      "titleImageURL" : "http:\/\/maps.gstatic.com\/mapfiles\/place_api\/icons\/cafe-71.png",
      "lat" : "43.786106",
      "lng" : "-79.474403",
      "title" : "Starbucks Coffee Company"
    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Cafes"
}

Share a advertisement

I shared some advertisement. Please click on the link below to check it out.

http://d.2ya.it/26ce6dd3-7da4-41fa-b729-d937f9f86b72
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "mapURL" : "http:\/\/maps.google.com\/?q=3071 16th,San Francisco,CA,94103",
      "adDescription" : "Fresh Mexican Cuisine In the Bay Area. Visit Us or Order Online Now.",
      "name" : "Pancho Villa Taqueria",
      "phone" : "8778462561",
      "address" : "3071 16th,San Francisco,CA,94103",
      "action" : "click",
      "sponsorsMessage" : "Sponsored by Superpages.com",
      "providerId" : "xad",
      "lat" : "1r32TfrY1%7Exn32TfrY1-0%7E1%7E1%7E1%7E2%7ECA%7Eus%7Exn32TfrY1%7E1%7E0%7E0%7E%7E0%7E0",
      "profileURL" : "http:\/\/local.xad.com\/rest\/redirect?k=SpryLogics411WSandv=1.0andl_id=1r32TfrY1%7Exn32TfrY1-0%7E1%7E1%7E1%7E2%7ECA%7Eus%7Exn32TfrY1%7E1%7E0%7E0%7E%7E0%7E0andwebsite=aHR0cDovL2NsaWNrcy5zdXBlcnBhZ2VzLmNvbS9jdC9jbGlja1Rocm91Z2g%2FU1JDPXZlLXBvcnRhbCZ0YXJnZXQ9U1AmUE49MSZUPVNhbitGcmFuY2lzY28mUz1DQSZDPXJlc3RhdXJhbnRzJlBHSUQ9YXVzbXMxMTMuODA4Mi4xMzY3MjMzOTMzNjkyLjc5MTEyNzgyMjY3NSZBTEc9MTExJlRTPWJ1bGxzJkFDVElPTj1sb2cscmVkJlRSPTEmYmlkVHlwZT1DTElLJnJlbGF0aXZlUG9zaXRpb249MCZwb3NpdGlvbj0wJlBHU049RTAmTVQ9RCZESUQ9aU9LcXl5V0Rwd1AlMkZCdFRKQnhtMm1nJTNEJTNEJmFjaWQ9biUyQmpXVUlRNSUyQnluQ1VBJTJCM1kwYUtZZyUzRCUzRCZjaWQ9MTQyMzY5NjcmYmlkPTAmRU09MCZNRElEPXpIazZsRzJlQzY4JTNEJlJTPTAuNDkyNzEyOTcmRkw9dXJsJlRMPW9mZiZMT0M9aHR0cDovL3NmcGFuY2hvdmlsbGEucmVhY2hsb2NhbC5jb20vP3NjaWQ9MjY5NzgwNA%3D%3Dandt=websiteandappid=thebestanduid=5B946349-980B-437B-A534-CFF3E7C5BEA3"
    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Advertisement"
}

Share a place

I shared some Places. Please click on the link below to check it out.

http://d.2ya.it/5c9d2d02-ea2c-4f19-a82f-0c8a6d9701ee
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "distance" : "0.61",
      "address" : "2180 Hwy 7 W Concord, Thornhill, ON, Canada",
      "name" : "Scotiabank",
      "stars" : "0.000000",
      "category" : "bank",
      "placeId" : "1279462",
      "titleImageURL" : "http:\/\/maps.gstatic.com\/mapfiles\/place_api\/icons\/generic_business-71.png",
      "lat" : "43.801348",
      "lng" : "-79.495322"
    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Places"
}

Share a location response

I shared my location. Please click on the link below to check it out.

http://d.2ya.it/f681d2c8-f578-4273-a023-57c542b665ee
{
  "senderJId" : "-12345678@chat.facebook.com",
  "data" : [
    {
      "locationCategory" : "LOCATION_RESPONSE",
      "lng" : -122.0936938075228,
      "lat" : 37.41872680589769,
      "locationUserId" : "-12345678@chat.facebook.com"
    }
  ],
  "senderName" : "Peter Wilson",
  "vertical" : "People"
}

Share a location request

Please click on the link below to share your location.

http://d.2ya.it/6db9a5a2-a76e-4c55-a202-409702b8ae75
{
  "senderJId" : "-12345678@chat.facebook.com",
  "data" : [
    {
      "locationCategory" : "LOCATION_REQUEST",
      "locationUserId" : "-1234567@chat.facebook.com"
    }
  ],
  "senderName" : "Peter Wilson",
  "vertical" : "People"
}

Share an Event

Please click on the link below to share an event.

http://d.2ya.it/c5a507d0f43b8e
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "id":"{\"internalDatabaseId\":null,\"partnerClickIds\":[{\"clickThruTypeIdsToProcess\":null,\"partnerId\":\"20\",\"partnerProvidedListingId\":\"E0-001-055689496-9\",\"extraDataFields\":null}],\"sectionId\":\"10\"}",
      "type" : "event",
      "startTime" : "2013-08-29 19:00:00",
      "venueName" : "Molson Amphitheatre",
      "distance" : "19.62",
      "titleImageURL" : "http://s3.evcdn.com/images/thumb/I0-001/003/112/602-8.png_/maroon-5-02.png",
      "lat" : "43.6293322",
      "lng" : "-79.4150723",
      "title" : "Maroon 5 With Kelly Clarkson",
      "street" : "909 Lakeshore Blvd West",
      "city" : "Toronto"

    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Events"
}

Share a Venue

Please click on the link below to share a venue.

http://d.2ya.it/c217ba13e998a9
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "id":"{\"sectionId\":\"10\",\"internalDatabaseId\":null,\"partnerClickIds\":[{\"partnerProvidedListingId\":\"V0-001-004791682-0\",\"partnerId\":\"20\",\"extraDataFields\":null,\"clickThruTypeIdsToProcess\":null}]}",
      "type" : "Arena",
      "distance" : "19.62",
      "titleImageURL" : "http://s4.evcdn.com/images/thumb/I0-001/003/991/531-2.jpeg_/air-canada-centre-31.jpeg",
      "lat" : "43.6437852",
      "lng" : "-79.3784416",
      "title" : "Air Canada Centre",
      "street" : "40 Bay Street",
      "city" : "Toronto"

    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Venues"
}

Share a Performer

Please click on the link below to share a performer.

http://d.2ya.it/a720840f99afb1
{
  "senderJId" : "-876543210@chat.facebook.com",
  "data" : [
    {
      "id":"{\"sectionId\":\"10\",\"internalDatabaseId\":null,\"partnerClickIds\":[{\"partnerProvidedListingId\":\"P0-001-000165263-2\",\"partnerId\":\"20\",\"extraDataFields\":null,\"clickThruTypeIdsToProcess\":null}]}",
      "type" : "performer",
      "titleImageURL" : "http://s3.evcdn.com/images/thumb/I0-001/013/609/166-3.png_/justin-bieber-66.png",
      "title" : "Justin Bieber",
      "shortBio" : "Pop"

    }
  ],
  "senderName" : "Peter Chan",
  "vertical" : "Performers"
}

Get share trending

Retrieve the top Movies, Youtube video, Restaurant, Bars and Cafes by lat & lng:

Set parameters:

  • appId={AppID}
  • lat={latitude}
  • lng={longitude}
  • d={km} (optional, default 30)
<shareCounts>
     <Trending>
          <count>14</count>
          <distance>18.977436073259668</distance>
          <item_id>7696afb65de55de363f178c308dc02b222d5b80d</item_id>
          <item_link_id>1467234</item_link_id>
          <item_name>Tota Lounge</item_name>
          <lastmodified>2013-05-09T06:06:22.164-04:00</lastmodified>
          <lat>43.647231</lat>
          <lng>-79.404299</lng>
          <provider_id>gp</provider_id>
          <vertical>bars</vertical>
     </Trending>
     <Trending>
          <count>7</count>
          <distance>19.15316894464224</distance>
          <item_id>87ffdf715b278908471b3635d779659bbead7920</item_id>
          <item_link_id>1411477</item_link_id>
          <item_name>Cafe On The Square</item_name>
          <lastmodified>2013-05-06T07:21:38.589-04:00</lastmodified>
          <lat>43.653062</lat>
          <lng>-79.384064</lng>
          <provider_id>gp</provider_id>
          <vertical>cafes</vertical>
     </Trending>
     <Trending>
          <count>142</count>
          <distance>0.0</distance>
          <item_id>76131</item_id>
          <item_link_id>76131</item_link_id>
          <item_name>The Croods</item_name>
          <lastmodified>2013-05-09T07:58:23.843-04:00</lastmodified>
          <lat>0.0</lat>
          <lng>0.0</lng>
          <provider_id>mo</provider_id>
          <vertical>movies</vertical>
     </Trending>
     <Trending>
          <count>38</count>
          <distance>19.23127259144272</distance>
          <item_id>cfd0aee93a26d927e7d5991b930ba25822738be6</item_id>
          <item_link_id>1411547</item_link_id>
          <item_name>B√Ęton Rouge Restaurant</item_name>
          <lastmodified>2013-05-06T07:22:30.749-04:00</lastmodified>
          <lat>43.653966</lat>
          <lng>-79.380042</lng>
          <provider_id>gp</provider_id>
          <vertical>restaurants</vertical>
     </Trending>
     <Trending>
          <count>87</count>
          <distance>0.0</distance>
          <item_id>A6XUVjK9W4o</item_id>
          <item_link_id>A6XUVjK9W4o</item_link_id>
          <item_name>PEOPLE ARE AWESOME 2013</item_name>
          <lastmodified>2013-05-09T08:00:18.717-04:00</lastmodified>
          <lat>0.0</lat>
          <lng>0.0</lng>
          <provider_id>yt</provider_id>
          <vertical>youtube</vertical>
     </Trending>
</shareCounts>

To get more detail on the trending item:

Use <item_link_id> to call listing API,

For Bars, Cafes and Restaurants: i.e. <item_link_id>1467234</item_link_id>

For movies:

For youtube: