[Owasp-o2-platform] TwitterAPI

dinis cruz dinis.cruz at owasp.org
Tue Jul 13 20:12:26 EDT 2010


Humm, I just noticed an issue with that API (thanks Colin) If you look at
the first line of the *'APIs\Twitter\Twitter Client.h2'* script, it expects
a secrets file to be located in

*var fileWithCredentials = @"C:\O2\_USERDATA\TwitterAccounts.xml";'*


and this secrets file should contain the desired user(s) with the
CredentialType to be marked as 'Twitter'

*secretData = fileWithCredentials.deserialize<SecretData>();*
*usersComboBox.clear();           ** ** ** *
*usersComboBox.add_Items(secretData.usernames("Twitter"));*


To create this file use the "O2 'Secret Data' Editor" link which you can
find in the "Windows Tools" Tab (and yeah the workflow on that tool needs
some improvement too :)  )

Steven, can you see if you can solve this (i.e. prompting the user for the
credentials) and send me a patch :) . If you want a clue on how to do it
(and what APIs to use) check out the *API_Blogger.cs* script (line 98 more
specifically :)  )

Have fun

Dinis Cruz

On 14 July 2010 00:31, Dinis Cruz <dinis at ddplus.net> wrote:

> Stick with the web install since I'm about to push a small update on that
> twitter API which will help you
>
> Can you try compiling it using the 'O2 Development Environment' (on the
> 'API / Script Development' tab)?
>
> Meanwhile, I'm going to forward you the details of the O2 testbox at Amazon
> EC2 so that you can use to try it (or replicate the problem)
>
> Dinis
>
>
> On Wed, Jul 14, 2010 at 12:20 AM, Steven van der Baan <steven at vdbaan.net>wrote:
>
>> Unfortunately that doesn't compile. Even after a restart or using the
>> option. I did place the dll in the install directory (I think it is c:\O2,
>> but i didn't see it in the log file). Am thinking of doing a complete
>> reinstall and check if that will help (i used the web installer and not the
>> MSI).
>>
>> I'll try to locate the possible differences between the web and MSI
>> installer, maybe it has something to do with that.
>>
>> Greetings,
>> Steven
>>
>>
>>
>> On 14 July 2010 00:56, dinis cruz <dinis.cruz at owasp.org> wrote:
>>
>>> Actually that file should had been automatically downloaded from the O2
>>> SVN codebase and placed on the O2 install directory (check the O2 LogViewer
>>> for details)
>>>
>>> To double check that all is working, can you run this script on the 'O2
>>> Simple Script Editor'?
>>>
>>> var twitterAPI = new O2TwitterAPI();
>>> return twitterAPI;
>>>
>>> //using O2.XRules.Database.APIs
>>> //O2File:O2TwitterAPI.cs
>>> //O2Ref:Dimebrain.TweetSharp.dll
>>> //O2Ref:Newtonsoft.Json.dll
>>>
>>> If that compiles OK and returns the O2TwitterAPI object, then all should
>>> be good
>>>
>>> (note you might need to restart O2 or click the option 'current source
>>> code' --> 'clear AssembliesCheckedIfExists list' context menu option from
>>> the  'O2 Simple Script Editor')
>>>
>>> Dinis Cruz
>>>
>>>
>>> On 13 July 2010 23:24, Steven van der Baan <steven at vdbaan.net> wrote:
>>>
>>>> Hi,
>>>>
>>>> i'm trying to use the Twitter client but i get the following error:
>>>> ERROR: [CSharp_FastCompiler] Compilation Error: 0::0::CS0006::Metadata
>>>> file 'Newtonsoft.Json.dll' could not be found::
>>>>
>>>> I know that i can place this DLL in my windows system32 directory to
>>>> make it work, but i don't like to do that. I rather place those type of
>>>> DLL's with the application which is requesting it. Is there a 'default'
>>>> location for foreign DLL's or another trick to make the O2Platform load
>>>> them.
>>>>
>>>> Thanks in advance,
>>>> Steven.
>>>>
>>>> _______________________________________________
>>>> Owasp-o2-platform mailing list
>>>> Owasp-o2-platform at lists.owasp.org
>>>> https://lists.owasp.org/mailman/listinfo/owasp-o2-platform
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Owasp-o2-platform mailing list
>> Owasp-o2-platform at lists.owasp.org
>> https://lists.owasp.org/mailman/listinfo/owasp-o2-platform
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/owasp-o2-platform/attachments/20100714/9fdd0bf0/attachment-0001.html 


More information about the Owasp-o2-platform mailing list