API Reference

Media.logShare


Syntax

media.logShare ( int mid, string sharetype, mixed post = NULL, int uid = 1, string logShareSetting = 'AnonMultShares' )

Arguments

NameTypeRequiredDefault valueDescription
midintRequirednoneThe id of the media you want to log a share for.
sharetypestringRequirednoneThe share type, which can be one of the following: 'facebook share','facebook like','linkedin','twitter','pinterest','googleplus','digg'.
postmixedOptionalNULLThis field contains any information that you want to store that is a result of the share.
uidintOptional1The id of the user of the logshare.
logShareSettingstringOptional'AnonMultShares'The log share setting: can be one of the following:
  • 'AnonMultShares' - anonymous users are allowed multiple shares (This is the default for anonymous users)
  • 'Anon0Shares' - anonymous users are not allowed any shares
  • 'LoggedIn1Share' - logged in users are allowed only 1 share
  • 'LoggedInMultShares' - logged in users are allowed multiple shares

Sharetype parameters

A list of the different sharetypes that can be passed to this method.

NameTypeDescription
facebookSTRINGUse this share type when logging a Facebook share.
linkedin STRINGThis is for a LinkedIn share event, obviously it too can be logged.
twitter STRINGTwitter is another share type that can be logged.
pinterest STRINGPinterest is another share type that can be logged.
reddit STRINGThis is a Google+ share event that can be logged.
digg STRINGThis is a Digg share event that can be logged.
stumbleupon STRINGThis is a stumbleupon based share that can be logged.
delicious STRINGThis is a delicious based share that can be logged.
email STRINGThis is an email based share that can be logged.

Response

The response returned on success and failure of media update.

NameTypeDescriptionPossible Values
resultStringThe returned result of the request to log a share. Returns 1 upon success; upon failure, the error is returned. true / Error type
statusbooleanThe status of the request as a whole. Unrelated to the success of updating the media item but rather was the request executed in full.true/false

Sample Response

Code examples

0 comments

Be the first to comment on logShare.

Add a Comment

  • captcha