Answer the question
In order to leave comments, you need to log in
How to optimize your work with Instagram?
There is a site written in Yii, almost the entire site rests on the Instagram API: there is a feed of photos, subscribers, who is subscribed to, my photos, etc.
Every time you go to some page of the site, you connect to Instagram, install a token, determine the current user, and then there is a request to obtain the necessary information (news, subscribers ...), because of this, the site opens for a long time, it turns out it is in every action reconnects.
How to reduce the load on the server, increase the processing speed? Can move requests to instagram and processing to the user part?
Answer the question
In order to leave comments, you need to log in
I would advise not to request an access token every time, but to store it in the session. If there is no token in the session or it is not valid, we reconnect, otherwise we use the one that is available to obtain the necessary information.
You can pull everything into an Angular application, which will already do all the dirty work and not keep extra connections. And let some REST send separate requests to you.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question