feat(api): 🎉 Add business profile and catalog management
* Implement endpoints for managing business profiles: - Get business profile - Update business profile * Add catalog management features: - List catalogs - List products in a catalog - Send catalog messages - Send single product messages - Send product list messages * Introduce media upload functionality for sending media files. * Add flow management capabilities: - Deprecate flows * Update API documentation to reflect new endpoints and features.
This commit is contained in:
@@ -10,6 +10,12 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// UploadMedia uploads a media file to Meta and returns the media ID.
|
||||
// Useful for pre-uploading media before referencing it in a later send call.
|
||||
func (c *Client) UploadMedia(ctx context.Context, data []byte, mimeType string) (string, error) {
|
||||
return c.uploadMedia(ctx, data, mimeType)
|
||||
}
|
||||
|
||||
// uploadMedia uploads media to the Business API and returns the media ID
|
||||
func (c *Client) uploadMedia(ctx context.Context, data []byte, mimeType string) (string, error) {
|
||||
url := fmt.Sprintf("https://graph.facebook.com/%s/%s/media",
|
||||
|
||||
Reference in New Issue
Block a user