SocialComposer.IsAvailableForServiceType
----------------------------------------

Queries whether a social service is available.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SocialComposer](component_SocialComposer.md) | [7.3](newinversion73.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md).

MBS( "SocialComposer.IsAvailableForServiceType"; Type ) 

**MBS**( **"SocialComposer.IsAvailableForServiceType";** /\* Queries whether a social service is available. \*/  
**$Type**) /\* The social service type.  
Can be Facebook, Twitter, SinaWeibo or TencentWeibo.e.g. "Facebook" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Type | The social service type.   Can be Facebook, Twitter, SinaWeibo or TencentWeibo. | "Facebook" |

### Result

Returns 0, 1 or error.

### Description

Queries whether a social service is available.  
Returns 1 if available or 0.  
  
This function can be called before having a composer initialized.  
### Examples

Check for availability:

 Set Variable \[ $r ; Value: MBS ( "SocialComposer.IsAvailableForServiceType"; PlaceHolder::Service ) \]   
If \[ $r ≠ 1 \]   
 Show Custom Dialog \[ "Can't send message." ; "This iOS device is not configured to post on " &amp; PlaceHolder::Service &amp; "." \]   
 Exit Script \[ Text Result: "failed" \]   
End If  
### See also

- [SocialComposer.New](SocialComposerNew.md)
- [SocialComposer.Present](SocialComposerPresent.md)

### Example Databases

- [iOS/Examples/iOS Social Posting](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/iOS/Examples/iOS%20Social%20Posting.shtml#4ScriptAnchor_)

This function is free to use.

Created 11st June 2017 , last changed 9th November 2021

  
[SocialComposer.ImageCount](SocialComposerImageCount.md) - [SocialComposer.IsPresented](SocialComposerIsPresented.md)

[HTML Version](SocialComposerIsAvailableForServiceType.shtml)