Search code examples
iosobjective-cwordpressmacos

WordPress API how to get user's links


Anyone knows how to retrieve user's links via WordPress API ? (The ones that get posted on their own (not as posts) and are assigned to various categories)

I know how to get all the posts, but that apparently doesn't include the links.

For example I get the images attached to posts like so:

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://public-api.wordpress.com/rest/v1/%@", method]]];

in this case the request being:

https://public-api.wordpress.com/rest/v1/sites/123456/posts

WordPress has this REST API, but there just doesn't seem to be anything about user's links there:

https://developer.wordpress.com/docs/api/


Solution

  • As per a response from Wordpress.com staff the links are deprecated and won't be added to the REST API:

    "The links manager has been deprecated in WordPress core version 3.5, so we won't be adding it to the REST API for that reason"

    No wonder I couldn't figure how to get to them