Platforms to show: All Mac Windows Linux Cross-Platform
SLRequestMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Social | MBS Mac64bit Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
You send a request to a social networking service to perform some operation on behalf of the user or to retrieve user information.
HTTP requests have these common components: an HTTP request method (GET, POST, PUT, or DELETE), a URL identifying the operation to perform, a set of query parameters, and an optional multipart POST body containing additional data. The values for these properties depend on the request you are sending and the target service provider. Refer to each supported social networking site’s documentation for possible values. Links to documentation are provided in Table 1.
Use the requestForServiceType:requestMethod:URL:parameters: method to initialize a newly created SLRequest object passing the required property values. Use the addMultipartData:withName:type: to optionally specify a multipart POST body. After you create your request, use the performRequestWithHandler: method to send the request, specifying the handler to call when the request is done.
If you already have a sending mechanism, you can use the preparedURLRequest method to create the request that you send using an NSURLConnection object. If the request requires user authorization, set the account property to an ACAccount object.
Available in OS X v10.8 and later. 64bit only.
- event performRequestCompleted(responseData as memoryblock, urlResponse as NSURLResponseMBS, error as NSErrorMBS, tag as Variant)
- 5 properties
- property account as ACAccountMBS
- property Handle as Integer
- property parameters as Dictionary
- property requestMethod as Integer
- property URL as String
- 4 methods
- method addMultipartData(data as memoryblock, name as string, type as string, filename as string)
- method Constructor(serviceType as string, requestMethod as Integer, URL as string, parameters as dictionary)
- method performRequest(tag as Variant = nil)
- method preparedURLRequest as NSURLRequestMBS
- 6 shared methods
- shared method Available as boolean
- shared method SLServiceTypeFacebook as string
- shared method SLServiceTypeLinkedIn as string
- shared method SLServiceTypeSinaWeibo as string
- shared method SLServiceTypeTencentWeibo as string
- shared method SLServiceTypeTwitter as string
- 4 constants
Constants
Constant | Value | Description |
---|---|---|
SLRequestMethodDELETE | 2 |
One of the request types.
Deletes the specified resource. Available in OS X v10.8 and later. |
SLRequestMethodGET | 0 |
One of the request types.
Requests information from the specified resource. Use a GET request to fetch information from the specified server such as character limits or a user’s timeline. Available in OS X v10.8 and later. |
SLRequestMethodPOST | 1 |
One of the request types.
Submits data to be processed. Use a POST request to submit information to the specified server such as a status update or an image. Available in OS X v10.8 and later. |
SLRequestMethodPUT | 3 |
One of the request types.
Uses a PUT request to submit the data. Available in OS X v10.9 and later. |
This class has no sub classes.
Some examples using this class:
The items on this page are in the following plugins: MBS Mac64bit Plugin.