Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / (DBPRO) HELP NEEDED - Integration with Facebook and Twitter

Author
Message
Starshyne Emir
User Offline
Joined: 27th Nov 2016
Location:
Posted: 28th Jan 2017 08:50
I'll be short here.
How can I post text and pictures on Facebook and / or Twitter via DBPro code?
Ortu
9
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 28th Jan 2017 15:05
You should be able to use the http commands to use their web api
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Starshyne Emir
User Offline
Joined: 27th Nov 2016
Location:
Posted: 29th Jan 2017 02:14
thanks
i'll check the web api and see what i can do.

by the way, i am facing a problem with file operations
i open a file to write, write some variables into it and close it, and when i check the file, it is blank.
what could be happening?

an example of what i normally do (without error handling)

file$ = "test.dat"
make file file$
open to write 1,file$
write string 1,"test"
close file 1

the file is created and opened properly, but no matter what i try to put into it, nothing happens

what could it be?
WickedX
8
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 29th Jan 2017 16:18
DBPro's file functions were poorly designed and Make File is the most useless function there is. Why have a function to create a file you can not do anything with? The Open To Write function will create the file if the file does not already exist.

file$ = "test.dat"
if file exist(file$)
delete file file$
endif
open to write 1, file$
write string 1, "test"
close file 1
Starshyne Emir
User Offline
Joined: 27th Nov 2016
Location:
Posted: 30th Jan 2017 08:49
Yeah, exactly.
Well, I was able to solve the file issue with Matrix1Utils datafile I/O plugin, which works flawlessly for me - and much probably to anyone else, too.

I am still wishing to find a way to posting on Facebook or Twitter from inside a DBPro program, and I didn't find anything valuable in their tutorials - probably because I'm a plain n00b, I think.

Well, thanks for all, folks. I love to post here because, although DBPro is almost extinct, there are still cool people to help a desperated wannabe programmer like me.
Chris Tate
DBPro Master
8
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 4th Feb 2017 14:59
DBPro could do with more HTTP and Web Browsing functionality
zero32
User Offline
Joined: 28th Jul 2016
Location:
Posted: 24th Feb 2017 07:15
i didn't try this, but dbpro can do post and get requests on forms. unlike javascript or php, dbpro does not like huge strings. you could read the pages into memblocks or those matrix1 unsave memory pointers and make functions to find and read the form tags and then use it with the dbpro build in http commands.
smerf
12
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 25th Feb 2017 05:11
I use nircmd a dos utility super small to do lots of things. usefull little tool can use with db if all else fails
A child's dream never dies.





Login to post a reply

Server time is: 2017-06-25 11:23:55
Your offset time is: 2017-06-25 11:23:55