Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

SocialRequest.SetAccount

Sets the account to use for this request.

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

Deprecated

This function was deprecated.

MBS( "SocialRequest.SetAccount"; Request; accountIdentifier )   More

Parameters

Parameter Description Example
Request The reference number for the social request as you got it from SocialRequest.New function. $request
accountIdentifier The ID for the account.

Result

Returns OK or error.

Description

Sets the account to use for this request.

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.Release - SocialRequest.SetRequestMethod