<script type="text/javascript" src="https://appcenter.intuit.com/Content/IA/intuit.ipp.anywhere.js"></script>
<script>
intuit.ipp.anywhere.setup({menuProxy: '/path/to/blue-dot', grantUrl: "<%= authenticate_settings_url %>"});
</script>
<body>
<ipp:blueDot></ipp:blueDot>
</body>
It is displaying bluedot menu on the top of my application but not displaying the companies that i am connected with. Insteed, it is displaying something like "We are sorry but we cannot load the menu right now".
I want to display the companies list that I am connected with in this blue dot menu. I think i am missing path of munuProxy :
menuProxy: '/path/to/blue-dot'
I have no idea what to do with this. If i have to give path to any bluedotMenu action than what should i write on that action to display list of companies?
How to fix this problem?
[NOTE: I am using Chrome and Firefox as my browser so, i don't think it's my browser problem]
You can use session to store tokens and use them whenever required
def bluedot
access_token = session[access_token]
access_secret = session[access_secret]
consumer = OAuth::AccessToken.new($qb_oauth_consumer, access_token, access_secret)
response = consumer.request(:get, "https://appcenter.intuit.com/api/v1/Account/AppMenu")
if response && response.body
html = response.body
render(:text => html) and return
end
end
You will get the blue dot menu content from "https://appcenter.intuit.com/api/v1/Account/AppMenu" url. before that you need to authenticate your self with valid authentication tokens i.e. session[access_token] and session[access_secret] in this case. and you are all done.