Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Jan A 59 posts 264 karma points
    Nov 30, 2017 @ 07:48
    Jan A

    Multiple sites, different instagram

    I have an umbraco installation with multiple sites. Each site has it's own instagram account. I want to retrieve the latest 20 post to display on the page

    I created a datatype of type Skybrud.Social - Instagram enter image description here

    Also created a property on the site settings of the datatype above enter image description here

    I setup the site settings for site1 and it works fine and the user is authenticated and I can get the posts. But since all information about the account is on the datatype, the problem is when I go to the settings for site2, it wants to access the same instagram account (since it's in the datatype)

    I realize I need to change the structure. Is there a way to change so the instagram account info is stored at the site settings node so I can have a generic property that are different for each site?

  • Ben Palmer 176 posts 842 karma points c-trib
    Nov 30, 2017 @ 08:23
    Ben Palmer

    Hi Jan,

    It looks like an inherent problem with the package that you're using so altering it's behaviour is potentially not a route you could take (unless it's open source and you can submit a code change).

    I wonder if you could simply get away with creating another version of the data type for each site? Not an ideal solution, granted but may do the job.

  • Jan A 59 posts 264 karma points
    Nov 30, 2017 @ 08:48
    Jan A

    Yes, I was also considering that. The "problem" is that there is 4 sites, so I will have Site1 Instagram, Site2 Instagram, 3 and 4 on the settings node. And this will be in all sites... So when I go to site 2 I get all 4 properties and only use one. Also I get a wierd behavior in the view. There I will have to check all 4 properties, and render the ones that are set. Not ideal.

    Another approach would be to make a subnode to the settings node, with Instagram settings, and have one document type for each site. Not ideal solution that either.

    So I know how to solve this, but I don't think 4 properties is ideal, like you said, and therefore looking for some insights on a better approach.

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Dec 04, 2017 @ 17:15
    Anders Bjerner

    Hi Jan,

    The data type actually only holds information about your Instagram app - not the user. So what you're looking for should be possible out-of-the box ;)

    What I think may happen is that if you log in with "Account 1" on "Site 1", and then try to log in on "Site 2", you're already logged in with "Account 1", and thus won't be given the option to log in with another Instagram account (this is on Instagram's end, so I can't do much about that). If this is the case, you should log out of Instagram first (or start a private session in your browser), and you should be able to log in with "Account 2" as well.

    Does that seem like the problem in your case?

Please Sign in or register to post replies

Write your reply to: