Is it possible to generate a shared link (sharing to FB etc.) that expires if the user doesn't pay their subscription fee? Currently I am using a service called Userapp that does subscriptions however I don't want a link to be active when a user isn't. Can Php generate such a link based on feedback from the userapp service or any user management service?
Sure. I'll use PayPal as an example. You could setup a recurring payments profile and then use their API to pull details about this profile.
Each time the URL loads the first thing you could do is hit the PayPal API to see if the related profile is still active, and if not, kill it or redirect to some sort of error page or whatever you want to do.
So you would basically setup a simple PHP service to receive the request from your app, hit PayPal for the details, and return a simple 1,0 for whether or not the profile is active.