How to fetch
- If a HasData tool is connected whose name contains
facebook_profile, call it. Read its schema. The handle is required. Do not run a shell command when the tool exists. - If no HasData tool is connected, ask the user to press Connect on the HasData connector for this chat. Do not install software and do not ask them to paste an API key.
- Use the
hasdatacommand only when the connector cannot be connected and the binary is already on PATH. Runhasdata --helpand use a Facebook command only if it is listed.
Pass handle without a URL and without an @ sign. If the user pasted a facebook.com URL, take the page slug from the path.
This tool returns the public profile. It does not return a post feed or comments. Say so if the user asked for posts, and offer the profile fields the tool actually returned. Scrape the page with the web scraping tool only when the profile tool cannot answer.