mergSocial is an iOS external that adds commands to present twitter, facebook and weibo post modal views. These views are available on iOS 6. The twitter post view is available on iOS 5. The mergSocial external replaces mergTweet and includes the deprecated mergTweet syntax. When using the mergSocial command for twitter on iOS 5 the external will call mergTweet.
Documentation
command mergSocial pServiceType,[pText],[pImagePaths],[pURLs]
Presents a modal view for posting to the specified social network service. This feature is available on iOS 6 only and will throw an error on other platforms. To use this feature your app must be comipled against the iOS 6 SDK or higher which means using LiveCode 5.5.3+ and Xcode 4.5 or higher.
Parameters:
- pServiceType - the service to post to
- pText - (optional with "" default) text to be posted
- pImagePaths - (optional with "" default) a full path to images to be posed
- pURLs - (optional with "" default) urls to be posted
Sets the result to one of:
- cancel
- done
function mergSocialIsAvailableForServiceType pServiceType
Determines if the service type is available
Parameters:
- pServiceType - the service being queried
Returns true if the service is available
command mergTweet pBody,[pURLs],[pImages]
Send a tweet using the standard iOS tweet sheet. Tweets are limited to 140 characters. If your command is failing check the result to find out if you have exceeded this limit.
Parameters:
- pBody - the body of the tweet
- pURLs - (optional with "" default) a comma delimted list of urls to add to the tweet
- pImages - (optional with "" default) a comma delimted list of image paths to add to the tweet
Sets the result to Sets the result to one of:
- not configured
- mergTweet: Error: body does not fit in available character space
- mergTweet: Error: url does not fit in available character space
- mergTweet: Error: image does not fit in available character space
- mergTweet: Error: can't send tweet
- mergTweet: tweet presented
Code sample
mergTweet fld "body" mergTweet "mergExt rules!","https://mergext.com" mergTweet "mergExt rules!","https://mergext.com",tImagePath |
function mergTweetCanSend
Checks to see if the device is configured to send a tweet. The Twitter framework is iOS 5 and up.
Returns boolean
Code sample
if mergTweetCanSend() then show btn "send" |