It will fail according to SharePoint internal mechanism. As of December 2017 CU, they still treat my site as it is on local farm using SPSite to open it! (http://www.codeovereasy.com/2016/05/setmyprofilepicture-fails-on-cross-farm-mysites-host/)
The only way to solve this problem is creating replicate UPA, which is quite overkill! (http://steve.thelineberrys.com/following-sites-across-farms-with-sharepoint-2013-mysites/) Just follow the step of cross farm Service Application (if you've done that) and create local UPA. Then, setup UPRE as described (select my site url, and language stuff in case you use search service).
PS. I've found somewhere in MS document stating that you should disable "Follow" on the consumer farm. It may imply that this is unsupported scenario.
I've found a similar issue. I get to the point that the there is a CSOM call from consumer farm to publishing farm. I face with the following message on ULS.
GetUserInfoFromMembershipProvider: Returning result. WebApp: '{WebApp_GUID}', LoginName: '{ClaimLoginString}', bIsRole: 'False', UserFound: 'True', UserKey: '{ClaimSID}'.
Failed to add the user to the database hr=0x80070050
Request does not have SPBasePermissions.UseRemoteAPIs permission. Need to check it when each API is accessed
serviceHost_RequestExecuting
The request does not have required permission to access SP.UserProfiles.FollowedContent..ctor
Exception occured in scope Microsoft.Office.Server.UserProfiles.FollowedContent.ctor. Exception=System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at Microsoft.SharePoint.Client.ServerStub.CheckRequiredResourceRight(ProxyContext proxyContext, String memberName, ResourceRight right)
at Microsoft.SharePoint.Client.ServerStub.CheckBlockedMethod(String methodName, ProxyContext proxyContext)
at Microsoft.Office.Server.UserProfiles.FollowedContentServerStub.InvokeConstructor(XmlNodeList xmlargs, ProxyContext proxyContext)
at Microsoft.SharePoint.Client.ServerStub.InvokeConstructorWithMonitoredScope(XmlNodeList args, ProxyContext proxyContext)
I've app management and subscription settings in place. The sts is setup to allow OAuthHttp.