Creating and scripting of Doctypes in developer mode

Hello

I am trying to create a Social media campaign for facebook using Graph API
I created the doctype like Facebook settings and added facebook option in social media post doctype and also have the python code with me.

But I dont know javascript and Not sure how the write the .js file
Like what would be the trigger to start the function in .py file or like how to start coding,I could not find the proper guidance since I am new to it

Hi:

You can write scripts for each doctype via GUI … search Client Script.
This scripts contains functions associated to events of the doctype which “trigger” the execution. In this scripts you can call methods of .py files associated to the same doctype or the entire application …

You can also write Python scripts via Server Scripts from the GUI.

Take a look here, is well documented …
https://frappeframework.com/docs/v13/user/en/tutorial

Hope this helps.

Oh I didnt know we could create server side script through GUI
ANd i have gone through the doc link …thanks
But I am not able to understand how to start writing the code
Like if you have any example or something?

Just write your own code in the client/server script…

Along the tutorial mentioned above you can see examples of code, both js and python … You can also explore repos in github (erpnext) to know how frappe/erpnext works …

This video explain how to consume external APIs

There is a lot of resources to learn.
Hope this helps.

Hey
Sorry I didnt understood from this video
But then I just thought to edit the py files and leave the js files for now
But I am unable to schedule it
I mean I added the time to post the thing, added the function name that is to be called by hooks.py file do I need to do anything else

Also I wanted to install a python library for a different .py file so how can I do that such that ?