Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending requests to facebook as a user from a third-party app

I need to initiate searches on facebook marketplace from my application on the user's device. This needs to happen on the user's device, and as the facebook user associated with the user using the application, to avoid getting blocked by facebook. As far as I can understand, this cannot be achieved using facebook's OAuth login and accessing the facebook information that is accessible through it.
Another hypothetical way that comes to mind, is to use the token that the user uses to login into facebook itself, though this one sounds frankly illegal.

tl;dr is there a way to run a search and retrieve the results on facebook marketplace as a user on a user's device?

like image 551
user2268997 Avatar asked Oct 27 '22 04:10

user2268997


1 Answers

I found your question on SO, and spent a good bit of time researching this, as I wanted to know the answer myself. Unfortunately, as best as I can tell, this is not possible through any official APIs. It seems like they may have once had something like this, as I found several links to FB API documentation that looked promising. But, the links all rerouted back to the Graph API homepage. I found a couple of references to the big data breaches FB has suffered in the last couple of years as possible reasons why their APIs were retooled and locked down.

I found several Facebook developer posts with questions about a Marketplace API where there were either no answers after months or years, or an official Facebook moderator posting a response like "This is a great idea, we always want to improve, use this form to submit your idea" and so on with no follow up.

I also found at least one SO post within the last 18 months where someone in the comments claimed to be able to post products to FB, but I think this was related to the Business Page Product Catalog, and is not what you're looking for. This is more like if a car dealership or something wants to post a new car for sale that's tied to their FB business page.

The Graph API allows for some decent searching and edge traversal but it is all related to posts, pictures, feeds, etc., and nothing related to the marketplace. Facebook pushes their Marketing APIs so heavily that it was tough to filter through that noise. And, of course, all of marketing apis are geared toward creating ads.

I found some Facebook information around API URLs looking like https://graph.facebook.com/search=terms&type=some_type that was very promising. But the type options seem to be limited to adcountry, adeducationschool, adeducationmajor, adlocale, adworkemployer, adkeyword, adzipcode, adgeolocation, and audienceinterest. And, as I dug deeper, it appears this is related to finding targeting groups for creating targeted posts. Nothing for marketplace.

I think that the answer, unfortunately, is that there are no offical FB APIs at this time that will allow querying search results from the Facebook Marketplace, much less provide enough information to reproduce a listing to display on a 3rd party app.

like image 70
jwatts1980 Avatar answered Nov 02 '22 06:11

jwatts1980