Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

SocialRequest.New

Creates a new social request.

Component Version macOS Windows Linux Server iOS SDK
Social 5.3 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes

Deprecated

This function was deprecated.

MBS( "SocialRequest.New" { ; ServiceType; URL; RequestMethod } )   More

Parameters

Parameter Description Example Flags
ServiceType The service type to use. Can be Twitter, Facebook, SinaWeibo, TencentWeibo or LinkedIn.
LinkedIn is macOS only and not available on iOS.
"Twitter" Optional
URL The URL to use for this request. Depends on the webservice. "https://api.twitter.com/1.1/statuses/update.json" Optional
RequestMethod What request method to use. Can be DELETE, PUT, POST or GET. "POST" Optional

Result

Returns reference number or error.

Description

Creates a new social request.
This function is for easily query social web services like Twitter or Facebook by using the user account defined in system preferences. So you don't need to implement calling web service yourself and you don't need to ask user for credentials.
Please use SocialRequest.Release later to free request.

Added iOS support for plugin version 7.3.

Examples

Post on Twitter:

Set Variable [$accounts; Value:MBS( "Social.Accounts"; "Twitter")]
Set Variable [$accountIdentifier; Value:GetValue($accounts; 1)]
If [$accountIdentifier = ""]
    Show Custom Dialog ["No Twitter account allowed?"]
Else
    Set Variable [$request; Value:MBS( "SocialRequest.New"; "Twitter"; "https://api.twitter.com/1.1/statuses/update.json"; "POST" )]
    Set Variable [$r; Value:MBS( "SocialRequest.AddParameter"; $request; "status"; Tweets::Message )]
    Set Variable [$r; Value:MBS( "SocialRequest.SetAccount"; $request; $accountIdentifier)]
    Set Variable [$r; Value:MBS( "SocialRequest.Perform"; $request; Get(FileName); "TweetCompleted" )]
End If

See also

Example Databases

This function is free to use.

Created 28th August 2015, last changed 12nd June 2020


SocialRequest.GetURL - SocialRequest.Perform

💬 Ask a question or report a problem