Social.HasAccessForAccountType
------------------------------

Checks if we do have permissions for this type of service.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Social](component_Social.md) | [5.3](newinversion53.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

### Deprecated

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

MBS( "Social.HasAccessForAccountType"; Type ) 

**MBS**( **"Social.HasAccessForAccountType";** /\* Checks if we do have permissions for this type of service. \*/  
**$Type**) /\* The type of accounts to checks.Can be Twitter, Facebook, SinaWeibo, TencentWeibo or LinkedIn.e.g. "Twitter" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Type | The type of accounts to checks.Can be Twitter, Facebook, SinaWeibo, TencentWeibo or LinkedIn. | "Twitter" |

### Result

Returns 0, 1 or error.

### Description

Checks if we do have permissions for this type of service.  
Returns 1 if you have permissions. If it returns 0, please use [Social.RequestAccessForAccountType](SocialRequestAccessForAccountType.md) function.  
### Examples

Check permissions:

 Set Variable \[$r ; Value:MBS ( "Social.HasAccessForAccountType"; "Twitter" )\]  
If \[$r = 1\]  
 Show Custom Dialog \["Permissions"; "We do have permissions for Twitter."\]  
Else If \[$r = 0\]  
 Show Custom Dialog \["Permissions"; "We don't have permissions for Twitter."\]  
Else  
 Show Custom Dialog \["Permissions"; "Failed to check: " &amp; $r \]  
End If  
### See also

- [Social.RequestAccessForAccountType](SocialRequestAccessForAccountType.md)

### Example Databases

- [Mac only/Tweet on Twitter](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/Tweet%20on%20Twitter.shtml#2ScriptAnchor_)

This function is free to use.

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

  
[Social.Accounts](SocialAccounts.md) - [Social.RequestAccessForAccountType](SocialRequestAccessForAccountType.md)

[HTML Version](SocialHasAccessForAccountType.shtml)