Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
SocialRequest.AddParameter
Adds a parameter to the request.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Social | 5.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
Deprecated
This function was deprecated.
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
Request | The reference number for the social request as you got it from SocialRequest.New function. | $request | |
Key | The name of the parameter. | "status" | |
Value | The value for this parameter. | "Hello World" | Optional |
Result
Returns OK or error.
Description
Adds a parameter to the 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
Test parameters:
Set Variable [ $request ; Value: MBS( "SocialRequest.New"; "Twitter"; "https://api.twitter.com/1.1/statuses/update.json"; "POST") ]
Show Custom Dialog [ "URL" ; MBS( "SocialRequest.GetParameterCount"; $Request ) ]
Set Variable [ $r ; Value: MBS( "SocialRequest.AddParameter"; $request; "test"; "value") ]
Show Custom Dialog [ "URL" ; MBS( "SocialRequest.GetParameterCount"; $Request ) ]
Set Variable [ $r ; Value: MBS( "SocialRequest.ClearParameter"; $request) ]
Show Custom Dialog [ "URL" ; MBS( "SocialRequest.GetParameterCount"; $Request ) ]
Set Variable [ $r ; Value: MBS( "SocialRequest.Release"; $request) ]
See also
- Social.Accounts
- SocialRequest.ClearParameter
- SocialRequest.GetParameterCount
- SocialRequest.New
- SocialRequest.Perform
- SocialRequest.Release
- SocialRequest.SetAccount
Example Databases
This function is free to use.
Created 28th August 2015, last changed 14th July 2022