Introducing Relay Hooks: Improved React APIs for Relay
This article was written in collaboration with Juan Tejada, a Software Engineer at Facebook.
Today, we are excited to release Relay Hooks: a set of new, more developer-friendly Relay APIs built using React Hooks.
But new does not mean untested: the rewritten Facebook.com is entirely powered by Relay Hooks, and these APIs have been the recommended way to use Relay at Facebook since mid-2019. The Hooks APIs were written in close collaboration with the React Core team, with the future of React in mind, and have proved themselves popular, stable and successful.
We’ve learned quite a few things about building maintainable, data-driven applications since we first developed Relay, and have distilled these best practices into a new guided tour and our updated docs. Though we still have a ways to go before getting started with Relay is as easy as we’d like, we believe this release substantially improves the Relay developer experience.
The new APIs are fully compatible with the existing APIs. We recommend writing any new code using Relay Hooks. Migrating existing containers to the new APIs is optional, and container-based code will continue to work.
What is Relay?
Relay is a JavaScript framework for fetching and managing GraphQL data in React applications that emphasizes maintainability, type safety and runtime performance.
Relay achieves this by combining declarative data fetching and a static build step. With declarative data fetching, components declare what data they need, and Relay figures out how to efficiently fetch it. During the static build step, Relay validates and optimizes queries, and pre-computes artifacts to achieve faster runtime performance.
What are Relay Hooks?
Relay Hooks is a set of new Hooks-based APIs for using Relay with React that improves upon the existing container-based APIs.
The Hooks APIs provide an improved developer experience, especially for refetching and pagination; have improved type safety with greater coverage; take advantage of compiler features to automate error-prone tasks, such as generating refetch queries; and are fully compatible with React Strict Mode.
In addition, the new APIs allow developers to more quickly show content to users by starting to fetch data before a component renders. Prefetching data in this way is not possible with the container-based APIs.
But most importantly, the new APIs are just simpler. Consider this example of pagination:
If you’re interested, you can see how this example would have looked if written using the old, container-based APIs here.
Where to go next
You can find more information about the new APIs in the announcement post on relay.dev. If you’re interested in trying out Relay Hooks, check out the getting started guide, the migration guide or the guided tour.
For a detailed plan of upcoming releases see this GitHub issue.
Acknowledgments
This release wasn’t just an effort by the Relay core team. We’re heavily indebted to the many open source contributors who have helped. We’d also like to thank the React core team for working closely with us in designing these new APIs. In addition, we’d like to thank Joe Savona, Lauren Tan and Dan Abramov for their generous help editing this announcement.
Enabling developers to create innovative AIs on Messenger and WhatsApp

Every week over 1 billion people connect with businesses on our messaging apps. Many of these conversations are made possible by the thousands of developers who build innovative and engaging experiences on Messenger, Instagram and WhatsApp.
Since opening access to our Llama family of large language models, we’ve seen lots of momentum and innovation with more than 30 million downloads to date. As our messaging services continue to evolve, we believe the technology from Llama and other generative AI models have the potential to enhance business messaging through more natural, conversational experiences.
At Connect Meta announced that developers will be able to build third-party AIs – a term we use to refer to our generative AI-powered assistants – for our messaging services.
We’re making it easy for any developer to get started, so we’re simplifying the developer onboarding process and providing access to APIs for AIs that make it possible to build new conversational experiences within our messaging apps.
All developers will be able to access the new onboarding experience and features on Messenger in the coming weeks. For WhatsApp, we’ll be opening a Beta program in November – if you’re interested in participating please sign up to the waitlist here to learn more.
We’ll keep everyone updated as we make these tools available to more developers later this year. We look forward to your feedback and seeing what you create.
First seen at developers.facebook.com
Introducing Facebook Graph API v18.0 and Marketing API v18.0

Today, we are releasing Facebook Graph API v18.0 and Marketing API v18.0. As part of this release, we are highlighting changes below that we believe are relevant to parts of our developer community. These changes include announcements, product updates, and notifications on deprecations that we believe are relevant to your application(s)’ integration with our platform.
For a complete list of all changes and their details, please visit our changelog.
General Updates
Consolidation of Audience Location Status Options for Location Targeting
As previously announced in May 2023, we have consolidated Audience Location Status to our current default option of “People living in or recently in this location” when choosing the type of audience to reach within their Location Targeting selections. This update reflects a consolidation of other previously available options and removal of our “People traveling in this location” option.
We are making this change as part of our ongoing efforts to deliver more value to businesses, simplify our ads system, and streamline our targeting options in order to increase performance efficiency and remove options that have low usage.
This update will apply to new or duplicated campaigns. Existing campaigns created prior to launch will not be entered in this new experience unless they are in draft mode or duplicated.
Add “add_security_recommendation” and “code_expiration_minutes” to WA Message Templates API
Earlier this year, we released WhatsApp’s authentication solution which enabled creating and sending authentication templates with native buttons and preset authentication messages. With the release of Graph API v18, we’re making improvements to the retrieval of authentication templates, making the end-to-end authentication template process easier for BSPs and businesses.
With Graph API v18, BSPs and businesses can have better visibility into preset authentication message template content after creation. Specifically, payloads will return preset content configuration options, in addition to the text used by WhatsApp. This improvement can enable BSPs and businesses to build “edit” UIs for authentication templates that can be constructed on top of the API.
Note that errors may occur when upgrading to Graph API v18 if BSPs or businesses are taking the entire response from the GET request and providing it back to the POST request to update templates. To resolve, the body/header/footer text fields should be dropped before passing back into the API.
Re-launching dev docs and changelogs for creating Call Ads
- Facebook Reels Placement for Call Ads
Meta is releasing the ability to deliver Call Ads through the Facebook Reels platform. Call ads allow users to call businesses in the moment of consideration when they view an ad, and help businesses drive more complex discussions with interested users. This is an opportunity for businesses to advertise with call ads based on peoples’ real-time behavior on Facebook. Under the Ad set Level within Ads Manager, businesses can choose to add “Facebook Reels” Under the Placements section. - Re-Launching Call Ads via API
On September 12, 2023, we’re providing updated guidance on how to create Call Ads via the API. We are introducing documentation solely for Call Ads, so that 3P developers can more easily create Call Ads’ campaigns and know how to view insights about their ongoing call ad campaigns, including call-related metrics. In the future, we also plan to support Call Add-ons via our API platform. Developers should have access to the general permissions necessary to create general ads in order to create Call Ads via the API platform.Please refer to developer documentation for additional information.
Deprecations & Breaking Changes
Graph API changes for user granular permission feature
We are updating two graph API endpoints for WhatsAppBusinessAccount. These endpoints are as follows:
- Retrieve message templates associated with WhatsAppBusiness Account
- Retrieve phone numbers associated with WhatsAppBusiness Account
With v18, we are rolling out a new feature “user granular permission”. All existing users who are already added to WhatsAppBusinessAccount will be backfilled and will continue to have access (no impact).
The admin has the flexibility to change these permissions. If the admin changes the permission and removes access to view message templates or phone numbers for one of their users, that specific user will start getting an error message saying you do not have permission to view message templates or phone numbers on all versions v18 and older.
Deprecate legacy metrics naming for IG Media and User Insights
Starting on September 12, Instagram will remove duplicative and legacy, insights metrics from the Instagram Graph API in order to share a single source of metrics to our developers.
This new upgrade reduces any confusion as well as increases the reliability and quality of our reporting.
After 90 days of this launch (i.e. December 11, 2023), we will remove all these duplicative and legacy insights metrics from the Instagram Graph API on all versions in order to be more consistent with the Instagram app.
We appreciate all the feedback that we’ve received from our developer community, and look forward to continuing to work together.
Please review the media insights and user insights developer documentation to learn more.
Deprecate all Facebook Wi-Fi v1 and Facebook Wi-Fi v2 endpoints
Facebook Wi-Fi was designed to improve the experience of connecting to Wi-Fi hotspots at businesses. It allowed a merchant’s customers to get free Wi-Fi simply by checking in on Facebook. It also allowed merchants to control who could use their Wi-Fi and for how long, and integrated with ads to enable targeting to customers who had used the merchant’s Wi-Fi. This product was deprecated on June 12, 2023. As the partner notice period has ended, all endpoints used by Facebook Wi-Fi v1 and Facebook Wi-Fi v2 have been deprecated and removed.
API Version Deprecations:
As part of Facebook’s versioning schedule for Graph API and Marketing API, please note the upcoming deprecations:
Graph API
- September 14, 2023: Graph API v11.0 will be deprecated and removed from the platform
- February 8, 2024: Graph API v12.0 will be deprecated and removed from the platform
- May 28, 2024: Graph API v13.0 will be deprecated and removed from the platform
Marketing API
- September 20, 2023: Marketing API v14.0 will be deprecated and removed from the platform
- September 20, 2023: Marketing API v15.0 will be deprecated and removed from the platform
- February 06, 2024: Marketing API v16.0 will be deprecated and removed from the platform
To avoid disruption to your business, we recommend migrating all calls to the latest API version that launched today.
Facebook Platform SDK
As part of our 2-year deprecation schedule for Platform SDKs, please note the upcoming deprecations and sunsets:
- October 2023: Facebook Platform SDK v11.0 or below will be sunset
- February 2024: Facebook Platform SDK v12.0 or below will be sunset
First seen at developers.facebook.com
Allowing Users to Promote Stories as Ads (via Marketing API)

Before today (August 28, 2023), advertisers could not promote images and/or videos used in Instagram Stories as ads via the Instagram Marketing API. This process created unwanted friction for our partners and their customers.
After consistently hearing about this pain point from our developer community, we have removed this unwanted friction for advertisers and now allow users to seamlessly promote their image and/or video media used in Instagram Stories as ads via the Instagram Marketing API as of August 28, 2023.
We appreciate all the feedback received from our developer community, and hope to continue improving your experience.
Please review the developer documentation to learn more.
First seen at developers.facebook.com
-
LINKEDIN2 weeks ago
Career stories: Influencing engineering growth at LinkedIn
-
Uncategorized2 weeks ago
Vanity Metrics: Definition & Examples for Marketing
-
Uncategorized7 days ago
5 B2B Social Media Marketing Tactics That Actually Work
-
Uncategorized1 week ago
2023 Average Engagement Rates for 13 Industries [STATS]
-
OTHER2 weeks ago
CCI Said to Have Appointed Former WhatsApp Executive, Government Officials as New Members
-
OTHER2 weeks ago
YouTube Announces AI-Enabled Editing Products for Video Creators
-
Uncategorized2 weeks ago
Instagram Emoji Guide: Meanings, Reactions, Ideas
-
OTHER2 weeks ago
Meta Urged Not to Roll Out End-to-end Encryption on Messenger, Instagram by UK