16.09.2014, 22:11 | #1 |
Участник
|
palleagermark: Send tweets from AX via the Retail module
Источник: http://www.agermark.com/2014/09/send...il-module.html
============== Once again I fell over some objects with interesting names in the retail code. This time I learned that you can update Twitter and Facebook from AX. In the following I'll describe the Twitter setup. First of all, you need to setup an application under your Twitter account. Go to https://apps.twitter.com/ to do that. Under settings, you need to fill in:
On the Permissions tab, give the application write access to the Twitter accounts that sign up to the application: That's it for Twitter. Go to Retail \ Setup \ Parameters \ Retail parameters to setup some seed data for the retail module. Click the Initialize button: Now in AX, go to Retail \ Setup \ Parameters \ Retail shared parameters and enter the API key secrets from above: Now when clicking the Link account button, you should get the option to link your Twitter account (the screen clip is in Danish, but you should be able to get the idea): So now all the bits and pieces are setup, and a very simplified piece of code like this example is able to post to Twitter: static void Tweet(Args _args){ smmCampaignMediaTypeGroup mediaTypeGroup; RetailMediaChannelConnectorSettings settings; RetailMediaChannelTwitterConnector connector; RetailMediaChannelMessage message; select firstOnly TableId from mediaTypeGroup where mediaTypeGroup.CampaignMediaTypeDescription == 'Twitter' join settings where settings.smmCampaignMediaTypeGroup == mediaTypeGroup.CampaignMediaTypeId; connector = RetailMediaChannelTwitterConnector::construct(settings); message = RetailMediaChannelMessage::construct(); message.parmMessage("Tweet from AX"); connector.push(message); } The result: Источник: http://www.agermark.com/2014/09/send...il-module.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|