Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/Facebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ using the plain graph api - no extensions installed.
- save this as `FAIRPOST_FACEBOOK_APP_ID` in your .env
- under 'settings', find your app secret
- save this as `FAIRPOST_FACEBOOK_APP_SECRET` in your .env

- before you use the app, set the App Mode to 'Live'
- use https://github.com/commonpike/fairpost/blob/master/public/privacy-policy.md for the privacy policy url
### Find the page id of the page you want the app to manage
- go to https://business.facebook.com/
- find your page (currently under 'settings > business assets')
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

111 changes: 111 additions & 0 deletions public/privacy-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
Privacy Policy
==============

Last updated: December 09, 2023

This Privacy Policy describes The Softwares policies and procedures on the collection, use and disclosure of Your information when You use Fairpost and tells You about Your privacy rights and how the law protects You.

The Software can use Your Personal data to provide the service. By using Fairpost, You agree to the collection and use of information in accordance with this Privacy Policy.

Interpretation and Definitions
------------------------------

### Interpretation

The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.

### Definitions

For the purposes of this Privacy Policy:

* **Account** means a unique account created for You to access our Service or parts of our Service.

* **Affiliate** means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority.

* **Application** refers to Fairpost, the software program provided by Fairpost (also referred to as either "The Software" or "Us" in this Agreement).

* **Country** refers to: Netherlands

* **Device** means any device that can access Fairpost such as a computer, a cellphone or a digital tablet.

* **Personal Data** is any information that relates to an identified or identifiable individual.

* **Service** refers to the Application's service.

* **Service Provider** means any natural or legal person who processes the data on behalf of The Software. It refers to third-party companies or individuals employed by The Software to facilitate Fairpost, to provide Fairpost on behalf of The Software, to perform services related to Fairpost or to assist The Software in analyzing how Fairpost is used.

* **Usage Data** refers to data collected automatically, either generated by the use of Fairpost or from Fairpost infrastructure itself (for example, the duration of a page visit).

* **You** means the individual accessing or using Fairpost, or The Software, or other legal entity on behalf of which such individual is accessing or using Fairpost, as applicable.


Collecting and Using Your Personal Data
---------------------------------------

### Types of Data Collected

#### Personal Data

While using The Software, The Software may ask You to provide Us with certain personally identifiable information that can be used to contact or identify You. Personally identifiable information may include, but is not limited to:

### Use of Your Personal Data

The Software may use Personal Data for the following purposes:

* **To provide and maintain our Service**, including to monitor the usage of our Service.

* **To manage Your Accounts:** to manage Your social feeds as a user of Fairpost. The Personal Data You provide can give You access to different functionalities of Fairpost that are available to You as a registered user on other platforms.


### Retention of Your Personal Data

The Software will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy. The Software will retain and use Your Personal Data to the extent necessary to comply with our legal obligations.

The Software will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a shorter period of time, except when this data is used to strengthen the security or to improve the functionality of The Software, or The Software are legally obligated to retain this data for longer time periods.

### Transfer of Your Personal Data

Your information, including Personal Data, is processed only where the software is executed.

Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to that transfer.

The Software will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance with this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of Your data and other personal information.

### Delete Your Personal Data

You have the right to delete the Personal Data that The Software have collected about You.

The Software may give You the ability to delete certain information about You from within Fairpost.

You may update, amend, or delete Your information at any time by using the software and changing the account settings section that allows you to manage Your personal information.

### Disclosure of Your Personal Data


### Security of Your Personal Data

The security of Your Personal Data is important to Us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While The Software strive to use commercially acceptable means to protect Your Personal Data, The Software cannot guarantee its absolute security.


Links to Other websites
-----------------------

The Software may contain links to other websites that are not operated by Us. If You click on a third party link, You will be directed to that third party's site. The Software strongly advise You to review the Privacy Policy of every site You visit.

The Software has no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services.

Changes to this Privacy Policy
------------------------------

Fairpost may update The Softwares Privacy Policy from time to time. The Software will notify You of any changes by posting the new Privacy Policy on this page.

The Software will let You know via a prominent notice on The Software, prior to the change becoming effective and update the "Last updated" date at the top of this Privacy Policy.

You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.

Contact Us
----------

If you have any questions about this Privacy Policy, You can contact us:

* By visiting this page on our website: [https://github.com/commonpike/fairpost/issues](https://github.com/commonpike/fairpost/issues)
5 changes: 3 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ async function main() {
}
case "get-platforms": {
const platforms = feed.getPlatforms(PLATFORMS);
report += platforms.length + " Platforms\n------\n";
platforms.forEach((platform) => {
report += platform.report() + "\n";
});
Expand All @@ -96,7 +97,7 @@ async function main() {
}
case "get-folders": {
const folders = feed.getFolders(FOLDERS);
report += folders.length + " Folders" + "\n";
report += folders.length + " Folders\n------\n";
folders.forEach((folder) => {
report += folder.report() + "\n";
});
Expand All @@ -115,7 +116,7 @@ async function main() {
platforms: PLATFORMS,
status: STATUS,
});
report += allposts.length + " Posts" + "\n";
report += allposts.length + " Posts\n------\n";
allposts.forEach((post) => {
report += post.report();
});
Expand Down
3 changes: 2 additions & 1 deletion src/platforms/LinkedIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export default class LinkedIn extends Platform {
super();
this.auth = new LinkedInAuth();
this.POST_AUTHOR =
"urn:li:organization:" + Storage.get("settings", "LINKEDIN_COMPANY_ID");
"urn:li:organization:" +
Storage.get("settings", "LINKEDIN_COMPANY_ID", "");
}

/** @inheritdoc */
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/Reddit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class Reddit extends Platform {

constructor() {
super();
this.SUBREDDIT = Storage.get("settings", "REDDIT_SUBREDDIT");
this.SUBREDDIT = Storage.get("settings", "REDDIT_SUBREDDIT", "");
this.auth = new RedditAuth();
}

Expand Down
8 changes: 5 additions & 3 deletions src/services/Fairpost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ class Fairpost {
}

public loadPlatforms() {
const activePlatformIds = Storage.get("settings", "FEED_PLATFORMS").split(
",",
);
const activePlatformIds = Storage.get(
"settings",
"FEED_PLATFORMS",
"",
).split(",");

const platformClasses = fs.readdirSync(
path.resolve(__dirname + "/../platforms"),
Expand Down
2 changes: 1 addition & 1 deletion src/services/Storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Storage {
throw Logger.error("Storage " + storage + " not implemented");
}
if (!value) {
if (!def) {
if (def === undefined) {
throw Logger.error("Value " + key + " not found in store " + store);
}
value = def;
Expand Down