Socialid.selfie.getPostInfo

From Social ID Developers
Jump to: navigation, search

Deprecation notice: this API is deprecated since July 19, 2018.

Contents

Description

Returns information about a post.

Usage

 socialid.selfie.getPostInfo(postId, handler)

Parameters

postId required post identifier.
handler optional callback function to be called on the API response.

API Response

data In case of success, an object containing post information.
status API call status. Can be "success" if the post exists, "not_found" if the post does not exist or "internal_server_error" if any unknown error happens.

Example

Returns information for the post with id 45325:

 var handler = function(response) {
    if (response.status == "success") {
       console.log(response.data);
    } else {
       alert("Couldn't found the post.");
    }
 }
 var appId = 1, postId = 45325;
 socialid.selfie.init(appId);
 socialid.selfie.getPostInfo(postId, handler);

Example "data" object:

 data = {
     created_at: "2014-08-28T15:32:20+00:00",
     display_name: "Jennyffer Suellen",
     likes: 0,
     low_picture_url: "http://scontent-b.cdninstagram.com/hphotos-xfa1/t51.2885-15/10632020_1540533216169293_1066110938_a.jpg",
     message: "Foca no iguana #focacbt",
     picture_url: "http://scontent-b.cdninstagram.com/hphotos-xfa1/t51.2885-15/10632020_1540533216169293_1066110938_n.jpg",
     post_id: 45325,
     post_url: "http://instagram.com/p/sP0HM_jwVv/",
     profile_picture_url: "http://photos-e.ak.instagram.com/hphotos-ak-xaf1/10632016_256085694602076_741961532_a.jpg",
     provider: "instagram",
     thumb_picture_url: "http://scontent-b.cdninstagram.com/hphotos-xfa1/t51.2885-15/10632020_1540533216169293_1066110938_s.jpg",
     user_liked: true,
     username: "jennyffer.suellen"
 }

The low_picture_url, thumb_picture_url, and user_liked properties may return as null depending on the post.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox