Actions29
- Posts Actions
- Comments Actions
- Users Actions
- Search Actions
Overview
The "Get Friendship" operation of the Users resource in this node interacts with the Sina Weibo API to retrieve the friendship status between the authenticated user and another specified user. This operation is useful for understanding the relationship or connection status on the social platform, such as whether one user follows another or if they are mutual friends.
Practical scenarios include:
- Checking if a user is following another user before sending a message or notification.
- Displaying friendship status in dashboards or reports.
- Automating social media management workflows that depend on user relationships.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the target user whose friendship status you want to check. |
| Screen Name | The screen name (username) of the target user as an alternative to User ID. |
Note: You can provide either the User ID or the Screen Name to specify the target user.
Output
The output JSON contains the friendship status information returned by the Sina Weibo API for the specified user pair. This typically includes details about whether the authenticated user follows the target user, whether the target user follows back, and other relevant relationship metadata.
The output structure is a JSON object representing the friendship data. There is no binary data output for this operation.
Example output snippet (conceptual):
{
"relationship": {
"source": {
"id": "12345",
"following": true,
"followed_by": false
},
"target": {
"id": "67890"
}
}
}
Dependencies
- Requires access to the Sina Weibo API via the n8n Tools API service.
- An API key credential for the n8n Tools API is recommended but not strictly required; if missing, validation is skipped.
- The node uses HTTP requests to communicate with the external API endpoints.
- No additional environment variables are explicitly required beyond standard n8n credentials setup.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that your API key credential for the n8n Tools API is correctly configured and active.
- Missing user identification: Ensure that either User ID or Screen Name is provided; otherwise, the API call may fail or return incomplete data.
- API rate limits: Be aware of potential rate limits imposed by the Sina Weibo API which could cause request failures.
- Network issues: Connectivity problems may result in HTTP request failures; check network access and proxy settings if applicable.
Links and References
- Sina Weibo API Documentation
- n8n Documentation - Creating Custom Nodes
- n8n Tools API Service (for API key and subscription management)